WalletConnect / walletconnect-utils

Javascript Utilities for WalletConnect
MIT License
65 stars 56 forks source link

Feat/chunk logging #163

Closed devceline closed 5 months ago

devceline commented 6 months ago

Changes

Motivation

https://walletconnect.slack.com/archives/C03RME3BS9L/p1710438640477839

devceline commented 5 months ago

Went back to original implementation of linked list because of the following edge case:

This was the scenario I was trying to talk about in my comment. It's deleting entires even though there is capacity remaining Max capacity 16 bytes Insert aaaa, bbbb, cccc, dddd [aaaa, bbbb, cccc, dddd] - at capacity Insert e [e, bbbb, cccc, dddd] - 3 capacity remaining Insert f [e, f, cccc, dddd] - 6 capacity remaining An alternative (I think how it works now) is to add to the end. But the issue here is now it's out-of-order: Max capacity 16 bytes Insert aaaa, bbbb, cccc, dddd [aaaa, bbbb, cccc, dddd] - at capacity Insert e [e, bbbb, cccc, dddd] - 3 capacity remaining Insert f [e, bbbb, cccc, dddd, f] - 2 capacity remaining Only solution would be to INSERT, but then we are doing shift operations which are >=O(n) - Chris (from slack)