orbitdb-archive / ipfs-log

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

Refactor log.values to make the sorting order and logic explicit #184

Closed haadcode closed 6 years ago

haadcode commented 6 years ago

This PR will refactor the Log's get values() implementation to make the sorting (=ordering) and conflict resolution more explicit.

The new implementation is also in preparation to be able to pass a custom conflict resolution function to the ordering logic in the future.

haadcode commented 6 years ago

Hold on reviewing, gonna make one more change.

haadcode commented 6 years ago

Ready for review now. Moved the sorting logic to "LastWriteWins" function which I feel better describes the ordering strategy and conflict resolution.

shamb0t commented 6 years ago

Looks good :+1: