diff options
Diffstat (limited to 'src/swarm/bootstrap.rs')
| -rw-r--r-- | src/swarm/bootstrap.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs index 98e273a..4384edb 100644 --- a/src/swarm/bootstrap.rs +++ b/src/swarm/bootstrap.rs @@ -70,13 +70,14 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start) return Ok(()); } if start == Start::Genesis { - // A remembered swarm starts again under its ID: nodes of it still running then - // merge with this one instead of ending up in another swarm. + // A remembered swarm starts again under its ID, from a root of its own: nodes of + // it still running hold another, and refuse it (`swarm::roots`); joining them + // takes seeds instead. let swarm_id = match state.swarm_id().await { Some(remembered) => { warn!( swarm_id = %remembered, - "--genesis with a remembered swarm: starting it again, empty; nodes of it still running merge with this one" + "--genesis with a remembered swarm: starting it again, empty, from a new root; nodes of it still running refuse it (another root): give seeds to join them instead" ); remembered } @@ -131,6 +132,9 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start) .context( "Recording the swarm ID, its neighbours, its topology and dissemination, its first users", )?; + if let Some(root) = crate::swarm::roots::own(state).await { + info!(root = %root, "The swarm's root: a node joining may be given it (--genesis-root), to take no other"); + } state.initial_sync_done.store(true, Ordering::Release); state.mark_ready(swarm_id).await?; // Remembered members, if any, to find those still running. |
