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/node.rs | |
| parent | 7c0c318dca3054be6c7bacf5a4b3f5a4e47cc949 (diff) | |
HyParView (slim)
Diffstat (limited to 'src/node.rs')
| -rw-r--r-- | src/node.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/node.rs b/src/node.rs index a9d99b2..28ce095 100644 --- a/src/node.rs +++ b/src/node.rs @@ -53,6 +53,8 @@ pub(crate) struct NodeConfig { pub(crate) stream_heartbeat: Duration, /// `--superseded-writes`. pub(crate) superseded_writes: crate::remake::Superseded, + /// `--topology`. + pub(crate) topology: crate::swarm::topology::Kind, /// `--dissemination`. pub(crate) dissemination: crate::swarm::dissemination::Kind, pub(crate) blob_chunk_bytes: u32, @@ -102,8 +104,11 @@ impl Node { discovered_swarm_id: None, })), peer_states: Arc::new(RwLock::new(HashMap::new())), - topology: Arc::new(crate::swarm::topology::RingAndPairs), - dissemination: config.dissemination.make(), + ways: Arc::new(std::sync::RwLock::new(crate::swarm::topology::Ways::new( + config.topology, + config.dissemination, + ))), + configured_ways: (config.topology, config.dissemination), // Counted above the firewall (in the paths layer, under the identity layer): // what it drops outbound counts as sent (it plays a lossy network), what it // drops inbound never arrived. Without the identity layer (tests) there is |
