From 28c8c1531ff5797c5877f94e6756cada530a8e0f Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Fri, 21 Nov 2025 12:48:33 -0300 Subject: [PATCH] cli/sync: filter seeds without an address If a seed for syncing does not have an address, the local node will not be able to connect to it. These can be filtered out so that no connection attempts are made for these nodes. --- crates/radicle-cli/src/commands/sync.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/radicle-cli/src/commands/sync.rs b/crates/radicle-cli/src/commands/sync.rs index 8e881827..0653214b 100644 --- a/crates/radicle-cli/src/commands/sync.rs +++ b/crates/radicle-cli/src/commands/sync.rs @@ -281,7 +281,10 @@ pub fn fetch( let candidates = connected .into_iter() .map(|seed| seed.nid) - .chain(disconnected.into_iter().map(|seed| seed.nid)) + .chain(disconnected.into_iter().filter_map(|seed| { + // Only consider seeds that have at least one known address. + (!seed.addrs.is_empty()).then_some(seed.nid) + })) .map(sync::fetch::Candidate::new); sync::FetcherConfig::public(settings.seeds.clone(), settings.replicas, *local) .with_candidates(candidates)