diff options
| author | tv <tv@krebsco.de> | 2026-11-06 19:54:09 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-06 19:54:09 +0100 |
| commit | 5994b49412c058079639585501a78e6458fdbb6f (patch) | |
| tree | ca78aa3cd7d0d6d2a48bfa42d61afcddb8efd6df /src/simtest/mod.rs | |
| parent | 7c0c318dca3054be6c7bacf5a4b3f5a4e47cc949 (diff) | |
HyParView (slim)
Diffstat (limited to 'src/simtest/mod.rs')
| -rw-r--r-- | src/simtest/mod.rs | 10 |
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, |
