diff options
| author | tv <tv@krebsco.de> | 2026-10-31 05:27:08 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 05:27:08 +0100 |
| commit | 2b41576767cfcaf317758349df84ff0b25f84f38 (patch) | |
| tree | 8093d0092b154fc3c7dca8b147381e342bd57754 /src/transport/sim.rs | |
| parent | 65e1b76ce1ae5e94c786b14bb97312266be7c5de (diff) | |
move DELIVERY_LIMIT to sim transport
Diffstat (limited to 'src/transport/sim.rs')
| -rw-r--r-- | src/transport/sim.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transport/sim.rs b/src/transport/sim.rs index f4a48aa..e783743 100644 --- a/src/transport/sim.rs +++ b/src/transport/sim.rs @@ -29,6 +29,10 @@ use super::{EncodedMessage, MessageHandler, MessageKind, ParsedMessage, Transpor use crate::locks::MutexExt; use crate::testrand::Rng; +/// 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); + /// How one direction of a link behaves. #[derive(Clone, Debug)] pub(crate) struct LinkParams { @@ -291,8 +295,8 @@ impl Transport for SimTransport { !id.is_empty() } - fn delivery_limit(&self) -> std::time::Duration { - crate::simtest::DELIVERY_LIMIT + fn delivery_limit(&self) -> Duration { + DELIVERY_LIMIT } /// A seed is a node ID; one no node has doesn't resolve (yet). |
