aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-15 23:36:09 +0000
committertv <tv@krebsco.de>2026-11-15 23:36:09 +0000
commitdefe7fe994ad5b73c8b0d5bef9a51cf9f58ec3b2 (patch)
tree89a0a3c7c5d39e430976b64c869098279319b5d1 /src/config/mod.rs
parent1a9af1eb760d7191f32dec3db0522e2184d3656a (diff)
config: a strict bootstrap policy found as the document reads it
A strict `--bootstrap-policy` is refused with `--remake`, but whether it was strict went by its JSON as given, where the node reads the policy as written into the document: a strict policy given as an envelope passed, and its genesis change was refused only once the node had started. Both now read it as written (`policy::as_written`).
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r--src/config/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 4100764..14bd984 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -928,7 +928,9 @@ impl Settings {
// 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() =>
+ if self.remake.is_some()
+ && crate::access::policy::as_written(&policy)
+ .is_ok_and(|policy| policy.strict()) =>
{
bail!(
"bootstrap-policy: a strict swarm starts empty, not from remake; one started from content turns strict through a strict remake"