aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/simtest/mod.rs')
-rw-r--r--src/simtest/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs
index c3b2368..dadc3e8 100644
--- a/src/simtest/mod.rs
+++ b/src/simtest/mod.rs
@@ -11,6 +11,7 @@
mod bench;
mod deltas;
+mod hyparview;
mod identity;
mod links;
mod reach;
@@ -193,9 +194,18 @@ impl Sim {
clock_skew_warn: Duration::from_secs(2),
stream_heartbeat: Duration::from_secs(30),
superseded_writes: Default::default(),
+ // `SIM_TOPOLOGY=hyparview`: every simulated node chooses its neighbours so.
+ topology: match std::env::var("SIM_TOPOLOGY").as_deref() {
+ Ok("hyparview") => crate::swarm::topology::Kind::Hyparview,
+ _ => Default::default(),
+ },
// `SIM_DISSEMINATION=plumtree`: every simulated node passes changes on so.
+ // Unset with `SIM_TOPOLOGY=hyparview`: PlumTree, as `--dissemination` is then.
dissemination: match std::env::var("SIM_DISSEMINATION").as_deref() {
Ok("plumtree") => crate::swarm::dissemination::Kind::Plumtree,
+ Err(_) if std::env::var("SIM_TOPOLOGY").as_deref() == Ok("hyparview") => {
+ crate::swarm::dissemination::Kind::Plumtree
+ }
_ => Default::default(),
},
blob_chunk_bytes: 64 * 1024,