orbitdb-archive / ipfs-log

Append-only log CRDT on IPFS
https://orbitdb.github.io/ipfs-log/
MIT License
398 stars 55 forks source link

Sort list of items that requires to grant the Write access by their clocks #326

Open pashoo2 opened 3 years ago

pashoo2 commented 3 years ago

https://github.com/orbitdb/ipfs-log/blob/17cc191f0b253e881539ca1c91e59d65b89ba6e9/src/log.js#L398

E.g. i need it to compare the previous item stored in the DB with the item, that requests a write access currently. So i need the previous item in comparison by their clock time, not by items they are added.

And, maybe, even better to pass all the lists of a new and a stored items to the "canAppend" callback