aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/bootstrap.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs
index 5c3b5ef..aa6d06b 100644
--- a/src/swarm/bootstrap.rs
+++ b/src/swarm/bootstrap.rs
@@ -110,11 +110,16 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start)
(crate::access::registry::user_path(name), entry)
})
.collect();
+ // Its policy too: no change of the swarm is then from before it.
+ let policy = state.first_policy.clone();
state
.mutate_doc(move |doc| {
for (path, entry) in &users {
store::write_path(doc, path, entry)?;
}
+ if let Some(policy) = &policy {
+ store::write_path(doc, &crate::access::policy::path(), policy)?;
+ }
store::write_path(doc, &swarm_id_path(), &recorded)?;
store::write_path(
doc,
@@ -130,7 +135,7 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start)
})
.await
.context(
- "Recording the swarm ID, its neighbours, its topology and dissemination, its first users",
+ "Recording the swarm ID, its neighbours, its topology and dissemination, its first users and policy",
)?;
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");