From ff79d15bb86d9030ade6e3fd7f403a904ddf4bd8 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Fri, 22 Mar 2024 13:09:31 +0100 Subject: [PATCH] cli: Change syncing rule for configured seeds Instead of waiting for *all* configured/preferred seeds to be synced, we wait for at least one. Note that the previous behavior can still be used by setting `--replicas` appropriately. --- radicle-cli/src/node.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radicle-cli/src/node.rs b/radicle-cli/src/node.rs index 2887b4db..3e27b985 100644 --- a/radicle-cli/src/node.rs +++ b/radicle-cli/src/node.rs @@ -254,9 +254,10 @@ fn announce_( // We're done syncing when both of these conditions are met: // // 1. We've matched or exceeded our target replica count. - // 2. We've synced with the seeds specified manually. + // 2. We've synced with one of the seeds specified manually. if replicas.len() >= settings.replicas - && settings.seeds.iter().all(|s| replicas.contains_key(s)) + && (settings.seeds.is_empty() + || settings.seeds.iter().any(|s| replicas.contains_key(s))) { ControlFlow::Break(()) } else {