diff options
| author | tv <tv@krebsco.de> | 2026-10-27 00:33:03 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-27 00:33:03 +0100 |
| commit | 7af8f58d46737bb5835aa1625485f22ecf374ebe (patch) | |
| tree | 4a2c82a4cc83fa7c14673f98a14c81d3ff0822a0 /src/transport/mycelium/mod.rs | |
| parent | ef4ec226ef720f4c3bdba5ae534465f67cda04ee (diff) | |
add Transport::delivery_limit
Diffstat (limited to 'src/transport/mycelium/mod.rs')
| -rw-r--r-- | src/transport/mycelium/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/mycelium/mod.rs b/src/transport/mycelium/mod.rs index 6304819..17344c7 100644 --- a/src/transport/mycelium/mod.rs +++ b/src/transport/mycelium/mod.rs @@ -15,6 +15,8 @@ pub(crate) mod daemon; pub(crate) use daemon::{MyceliumSetup, MyceliumSpawnConfig}; const MYCELIUM_POLL_TIMEOUT_SECS: u64 = 300; +/// How long Mycelium tries to deliver a message before dropping it. +const DELIVERY_LIMIT: Duration = Duration::from_secs(300); /// The largest inbound message read (its JSON, base64 payload included: about 190 MiB of /// payload). Anyone can send us anything; this bounds what one message costs before it /// is even parsed. Generous, because a sync message can carry a whole history until @@ -188,6 +190,10 @@ impl Transport for MyceliumTransport { is_pubkey(id) } + fn delivery_limit(&self) -> Duration { + DELIVERY_LIMIT + } + async fn resolve_seed(&self, hint: &str) -> Result<String> { if is_pubkey(hint) { return Ok(hint.to_owned()); |
