diff options
| author | tv <tv@krebsco.de> | 2026-10-25 22:45:35 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-25 22:45:35 +0100 |
| commit | 6febc8176fd2e18e1e8503d3eeaa1a9b5ca74797 (patch) | |
| tree | df4015fcc54010db949f2a581cc64b05de278300 /src/simtest/mod.rs | |
| parent | 0c8e2565b4c80c09f0ba5076b1e27762f2b16eeb (diff) | |
MYCELIUM_DELIVERY_LIMIT -> Timing::delivery_limit
Diffstat (limited to 'src/simtest/mod.rs')
| -rw-r--r-- | src/simtest/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs index f0fee02..18975aa 100644 --- a/src/simtest/mod.rs +++ b/src/simtest/mod.rs @@ -34,6 +34,9 @@ pub(crate) const KEEPALIVE: Duration = Duration::from_millis(250); /// First wait for a sync answer before sending again (10 s in production, where large /// messages take a while): a lost sync message costs a test 1 s, a heal 2 s. pub(crate) const SYNC_REPLY_TIMEOUT: Duration = Duration::from_secs(1); +/// How long the simulated net may take to deliver a message: well above its delays. +/// A catch-up source that stops sending sync messages is given up after this. +pub(crate) const DELIVERY_LIMIT: Duration = Duration::from_secs(3); /// A simulated swarm: the net and the nodes started on it. pub(crate) struct Sim { @@ -71,7 +74,10 @@ impl Sim { initial_epoch: Epoch::GENESIS, initial_doc: AutoCommit::new(), earlier_actors: Vec::new(), - timing: Timing::new(KEEPALIVE, SYNC_REPLY_TIMEOUT), + timing: Timing { + delivery_limit: DELIVERY_LIMIT, + ..Timing::new(KEEPALIVE, SYNC_REPLY_TIMEOUT) + }, neighbours_k: 8, alias: Some(id.to_owned()), electorate_window: Duration::from_secs(30 * 24 * 3600), |
