Skip to main content

sync_with_peer

Function sync_with_peer 

Source
pub fn sync_with_peer(
    project: &mut Project,
    peer_id: &str,
    peer: &Project,
) -> SyncReport
Expand description

v0.39.1: Run a full sync pass against a peer’s already-fetched frontier state. Diffs, emits one frontier.synced_with_peer event recording the pass, and one frontier.conflict_detected event per disagreement. Returns the report; caller persists the project.

Splitting fetch from sync this way lets the sync logic be fully unit-testable without HTTP — the CLI pipes a real fetch into this function.