From 8a134df62167a85fa083ccf480a939fd654e2419 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2026 16:35:02 +0100 Subject: dissemination trait --- src/swarm/sync.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/swarm/sync.rs') diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 66fa4a5..45d3d75 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -687,7 +687,10 @@ pub(crate) async fn handle_sync( crate::swarm::relay::pulled(state, peer); if state.initial_sync_done.load(Ordering::Acquire) && !just_caught_up { - crate::swarm::tree::note_arrival(state, peer, writer, carried, &authors).await; + state + .dissemination + .note_arrival(state, peer, writer, carried, &authors) + .await; } // Caught up: our other neighbours may lack what the source had. if changed || just_caught_up { @@ -703,7 +706,7 @@ pub(crate) async fn handle_sync( // A writer's changes along its tree that we had already: they came another way // first, not saying whose (with an answer to one of our messages, say), so we // passed nothing on then. Our children in its tree may lack them still. - crate::swarm::tree::forward(state, writer, peer, &[]).await; + state.dissemination.forward(state, writer, peer, &[]).await; } state @@ -941,7 +944,7 @@ pub(crate) async fn run_sync_worker(state: AppState, mut rx: mpsc::UnboundedRece let own = crate::swarm::topology::pair_key(state.local_id()); let ours = own_changes(&state, &mut seen_heads).await; let covered = match &ours { - Some(ours) => match crate::swarm::tree::plan(&state, own).await { + Some(ours) => match state.dissemination.plan(&state, own).await { Some(plan) => { for neighbour in &plan.covered { if let Some(peer_state) = state.get_peer_state(neighbour).await { -- cgit v1.3.1