From 5994b49412c058079639585501a78e6458fdbb6f Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2026 19:54:09 +0100 Subject: HyParView (slim) --- src/swarm/bootstrap.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/swarm/bootstrap.rs') 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. -- cgit v1.3.1