diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/mod.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 1686792..4100764 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -923,10 +923,18 @@ impl Settings { { bail!("{why}"); } - if let Err(why) = - crate::access::policy::first(self.bootstrap_policy.as_deref(), &self.bootstrap_keys) - { - bail!("{why}"); + match crate::access::policy::first(self.bootstrap_policy.as_deref(), &self.bootstrap_keys) { + Err(why) => bail!("{why}"), + // Its content would be a change of its own before the policy's: a swarm + // strict from its start has none, so it starts empty. + Ok(Some(policy)) + if self.remake.is_some() && crate::access::policy::read(&policy).strict() => + { + bail!( + "bootstrap-policy: a strict swarm starts empty, not from remake; one started from content turns strict through a strict remake" + ) + } + Ok(_) => {} } if let Some(root) = &self.genesis_root && crate::swarm::roots::parse(root).is_none() |
