From 9a165fd06a1b52bb943a84f26adf8dec72056143 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 26 Oct 2026 19:21:13 +0100 Subject: add pull queue --- src/swarm/sync.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/swarm/sync.rs') diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 868fead..0fbff05 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -400,7 +400,8 @@ pub(crate) async fn handle_sync( source::reported(state, peer, from_ready, None); - if caught_up && !state.initial_sync_done.swap(true, Ordering::AcqRel) { + let just_caught_up = caught_up && !state.initial_sync_done.swap(true, Ordering::AcqRel); + if just_caught_up { info!(peer = %peer, "Initial sync complete"); state .stats @@ -411,7 +412,8 @@ pub(crate) async fn handle_sync( state.notify_store_changed(); crate::swarm::relay::pulled(state, peer); - if changed { + // Caught up: our other neighbours may lack what the source had. + if changed || just_caught_up { crate::swarm::relay::announce(state, peer).await; } -- cgit v1.3.1