mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 18:40:39 +08:00
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.
This commit is contained in:
@@ -254,9 +254,10 @@ fn announce_<R: ReadRepository>(
|
||||
// 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 {
|
||||
|
||||
Reference in New Issue
Block a user