diff options
| author | tv <tv@krebsco.de> | 2026-11-06 19:54:09 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-06 19:54:09 +0100 |
| commit | 5994b49412c058079639585501a78e6458fdbb6f (patch) | |
| tree | ca78aa3cd7d0d6d2a48bfa42d61afcddb8efd6df /src/swarm/bootstrap.rs | |
| parent | 7c0c318dca3054be6c7bacf5a4b3f5a4e47cc949 (diff) | |
HyParView (slim)
Diffstat (limited to 'src/swarm/bootstrap.rs')
| -rw-r--r-- | src/swarm/bootstrap.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs index 8665253..76e056d 100644 --- a/src/swarm/bootstrap.rs +++ b/src/swarm/bootstrap.rs @@ -88,6 +88,9 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start) }; let recorded = JsonValue::String(swarm_id.clone()); let neighbours = state.neighbours_k; + // Plain names (kebab-case): serializing them can't fail. + let topology = serde_json::to_value(state.configured_ways.0).unwrap_or_default(); + let dissemination = serde_json::to_value(state.configured_ways.1).unwrap_or_default(); state .mutate_doc(move |doc| { store::write_path(doc, &swarm_id_path(), &recorded)?; @@ -95,10 +98,16 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start) doc, &crate::swarm::topology::neighbours_path(), &JsonValue::from(neighbours), + )?; + store::write_path(doc, &crate::swarm::topology::topology_path(), &topology)?; + store::write_path( + doc, + &crate::swarm::topology::dissemination_path(), + &dissemination, ) }) .await - .context("Recording the swarm ID and its neighbours")?; + .context("Recording the swarm ID, its neighbours, its topology and dissemination")?; state.initial_sync_done.store(true, Ordering::Release); state.mark_ready(swarm_id).await?; // Remembered members, if any, to find those still running. |
