From 22f9ac13bd0089f89cd2dd74932b522ab0c285c0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 1 Dec 2026 02:08:53 +0000 Subject: 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. --- src/swarm/peer/keepalive.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/swarm/peer/keepalive.rs') diff --git a/src/swarm/peer/keepalive.rs b/src/swarm/peer/keepalive.rs index bbcc6e3..5072f01 100644 --- a/src/swarm/peer/keepalive.rs +++ b/src/swarm/peer/keepalive.rs @@ -22,6 +22,9 @@ use crate::transport::{self, ParsedMessage}; /// Sends `peer` a STATUS with our status. pub(crate) async fn send_status(state: &AppState, peer: &str) -> Result<()> { + // A node of both kinds: where its set stands, beside (`swarm::set`). + #[cfg(feature = "federation")] + crate::swarm::set::say_beside(state, peer).await; let status = local_status(state, peer).await; if let Some(peer_state) = state.get_peer_state(peer).await { peer_state.lock().await.last_status_at = Some(Instant::now()); -- cgit v1.3.1