diff options
| author | tv <tv@krebsco.de> | 2026-12-01 02:08:53 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 02:08:53 +0000 |
| commit | 22f9ac13bd0089f89cd2dd74932b522ab0c285c0 (patch) | |
| tree | 5b5f9c09755f385743c9537672542456b79a6a2e /src/swarm/sync.rs | |
| parent | eadf0952260ba4b21e791226cf5ad39e8f079c86 (diff) | |
federation: nodes of both kinds pass their sets on to each other, too
Two nodes of both kinds say an Automerge document in their handshakes,
and synced that alone: what only sets hold, the entries of the nodes on
sets, stopped at the first node of both it reached, so that in a swarm
larger than its neighbour count the nodes on sets never came to read
each other's entries. A node of both now says where its set stands
beside each STATUS to a peer on a document; one of both that hears it
passes its set on in turn, one on the document alone drops it.
A simulation of nine nodes, three of each kind, two neighbours each.
Diffstat (limited to 'src/swarm/sync.rs')
| -rw-r--r-- | src/swarm/sync.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 3939377..95149f9 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -66,7 +66,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { // A set of events is passed on otherwise (`swarm::set`): with a peer that holds // one, and of the Automerge document a node holds beside one alone, no sync. #[cfg(feature = "federation")] - if state.of_a_set() || crate::swarm::set::holds_a_set(state, peer).await { + if state.of_a_set() || crate::swarm::set::holds_a_set_alone(state, peer).await { return Ok(()); } |
