diff options
Diffstat (limited to 'src/simtest')
| -rw-r--r-- | src/simtest/identity.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/simtest/identity.rs b/src/simtest/identity.rs index 6f468a3..68d81c4 100644 --- a/src/simtest/identity.rs +++ b/src/simtest/identity.rs @@ -202,13 +202,19 @@ async fn nodes_over_libp2p() { } }; let a_peer = key("a").public().to_peer_id(); - let seed = format!("libp2p:{}", address("a").with_p2p(a_peer).unwrap()); + // With the peer ID, with the scheme but without the peer ID, and bare. + let seeds = [ + format!("libp2p:{}", address("a").with_p2p(a_peer).unwrap()), + format!("libp2p:{}", address("a")), + address("a").to_string(), + ]; let sim = Sim::with_identity(56); let a = sim.start_with("a", &[], Start::Genesis, on_libp2p("a")); let others: Vec<AppState> = ["b", "c", "d"] .into_iter() - .map(|id| sim.start_with(id, &[seed.as_str()], Start::Join, on_libp2p(id))) + .zip(&seeds) + .map(|(id, seed)| sim.start_with(id, &[seed.as_str()], Start::Join, on_libp2p(id))) .collect(); let mut all: Vec<&AppState> = vec![&a]; all.extend(others.iter()); |
