automerge / hypermerge

Build p2p collaborative applications without any server infrastructure in Node.js
MIT License
1.28k stars 66 forks source link

Use the ClockStore to determine doc minimum clocks #42

Closed mjtognetti closed 4 years ago

mjtognetti commented 4 years ago

Won't push a document to the handles until that document has satisfied a minimum good clock. Previously, the minimum good clock logic was contained within DocBackend. This PR moves it out of DocBackend and compares against the ClockStore. Once a minimum clock has been met, we store a local clock which can then be broadcast to peers to indicate you have a good version of the document.