Skip to main content

merge_state

Function merge_state 

Source
pub fn merge_state(current: &RepoState, incoming: &RepoState) -> RepoState
Expand description

Apply a full new state on top of the existing state, treating both as CRDT snapshots and merging deterministically. This is the path triggered by a peer pushing a fresh state to us.

Returns the merged state; never overwrites with strictly-older info.