diff options
| author | tv <tv@krebsco.de> | 2026-11-05 00:29:56 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-05 00:29:56 +0100 |
| commit | 52e307d7b95dda735d1afbc4fe2dcffaa87512a4 (patch) | |
| tree | 262c3fe7a18e6af82deacf7956640a3429a6822e /src/swarm/sync.rs | |
| parent | 26d41bef0de3a0d8f25b62776e966ed464a34063 (diff) | |
delta from held heads
Diffstat (limited to 'src/swarm/sync.rs')
| -rw-r--r-- | src/swarm/sync.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 3cbead1..2a08aae 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -162,6 +162,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { // (it didn't answer in time): offered again without generating the // message it replaces, which may take seconds when large. let again = peer_state.sync.offer_again( + &replica.doc, replica.heads(), delta_threshold, Instant::now(), @@ -186,7 +187,9 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { // Too large for one message: all or nothing, and on a slow link // within the transport's delivery limit. The peer fetches it in // chunks. - let from = peer_state.sync.withdraw_for_delta(Instant::now()); + let from = peer_state + .sync + .withdraw_for_delta(&replica.doc, Instant::now()); let spec = transport::DeltaSpec::new(from, replica.heads().to_vec()); if spec.to.iter().all(|head| spec.from.contains(head)) { // It has our heads: nothing to offer (Automerge thought it |
