diff --git a/radicle-cli/src/commands/sync.rs b/radicle-cli/src/commands/sync.rs index 63700d44..3fb33a0a 100644 --- a/radicle-cli/src/commands/sync.rs +++ b/radicle-cli/src/commands/sync.rs @@ -398,15 +398,21 @@ fn announce_refs( } } RepoSync::Replicas(replicas) => { - let synced = synced.collect::>(); - if synced.len() >= seeds.len() { + let synced = synced + .filter(|s| &s.nid != profile.id()) + .collect::>(); + let connected = seeds + .connected() + .filter(|s| &s.nid != profile.id()) + .collect::>(); + if synced.len() >= connected.len() { term::success!( "Nothing to announce, already in sync with network (see `rad sync status`)" ); return Ok(()); } // Replicas not counting our local replica. - let remotes = synced.iter().filter(|s| &s.nid != profile.id()).count(); + let remotes = synced.len(); if remotes >= replicas { term::success!("Nothing to announce, already in sync with {remotes} seed(s) (see `rad sync status`)"); return Ok(());