diff options
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()); |
