aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/sync.rs5
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