aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/relay.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 18:07:07 +0100
committertv <tv@krebsco.de>2026-10-31 18:07:07 +0100
commit4a9f4507f3161791f80c8c25a6f0e9ccd3649c2c (patch)
tree7de1e540b12879364105e275feb07a5b129251a5 /src/swarm/relay.rs
parent4ea5867047d869ea6a33efd6a47a2adc2340114e (diff)
move all automerge references to document
Diffstat (limited to 'src/swarm/relay.rs')
-rw-r--r--src/swarm/relay.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/swarm/relay.rs b/src/swarm/relay.rs
index c28c9f1..d11c3e0 100644
--- a/src/swarm/relay.rs
+++ b/src/swarm/relay.rs
@@ -130,16 +130,9 @@ pub(crate) async fn pull_if_behind(
}
// Those of the listed heads we lack. With a digest only a sample is listed; if we
// have all of it, a later keepalive lists others.
- let missing: Vec<_> = {
- // Document's lookups take &mut self.
+ let missing = {
let mut replica = state.doc.write().await;
- remote
- .heads
- .listed()
- .iter()
- .filter(|head| replica.doc.get_change_by_hash(head).is_none())
- .copied()
- .collect()
+ crate::document::changes::missing(&mut replica.doc, remote.heads.listed())
};
if missing.is_empty() {
return false;