diff options
| author | tv <tv@krebsco.de> | 2026-11-07 22:35:21 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-07 22:35:21 +0100 |
| commit | b6f815882a6d4a32c1198bd3666edaeaf1f7bca3 (patch) | |
| tree | 5beab4b31fd4511446c8e3a7445412ce7f33f97a /src/simtest | |
| parent | e696d2f40636a6613eddfb1a3afdf87aa7ffdedd (diff) | |
access: --bootstrap-keys
The first users' SSH keys, recorded at genesis with their entries, so a
swarm can be strict from its start.
Auth plan M7.
Diffstat (limited to 'src/simtest')
| -rw-r--r-- | src/simtest/mod.rs | 2 | ||||
| -rw-r--r-- | src/simtest/policy.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs index 1dc60ea..7fdc3f0 100644 --- a/src/simtest/mod.rs +++ b/src/simtest/mod.rs @@ -214,7 +214,7 @@ impl Sim { blob_chunk_bytes: 64 * 1024, swarm_key: None, protocol_writers: HashSet::new(), - first_users: Vec::new(), + first_users: Default::default(), // Under the identity layer, its key signs as a node's does. node_key: self.identity.then(|| Arc::new(sim_key(id))), sign_every: Default::default(), diff --git a/src/simtest/policy.rs b/src/simtest/policy.rs index b56766b..d425ecf 100644 --- a/src/simtest/policy.rs +++ b/src/simtest/policy.rs @@ -46,7 +46,7 @@ async fn refused(node: &AppState) -> usize { async fn a_swarm_judging_every_change() { let sim = Sim::with_identity(71); let a = sim.start_with("a", &[], Start::Genesis, |config| { - config.first_users = vec!["alice".to_owned()]; + config.first_users = [("alice".to_owned(), Default::default())].into(); }); let b = sim.start("b", &["a"], Start::Join); let c = sim.start("c", &["a"], Start::Join); @@ -98,7 +98,7 @@ async fn a_swarm_judging_every_change() { async fn a_remake_under_the_policy() { let sim = Sim::with_identity(72); let a = sim.start_with("a", &[], Start::Genesis, |config| { - config.first_users = vec!["alice".to_owned()]; + config.first_users = [("alice".to_owned(), Default::default())].into(); }); let b = sim.start("b", &["a"], Start::Join); let c = sim.start("c", &["a"], Start::Join); |
