From: Joseph Goulden Date: Fri, 20 Aug 2021 14:48:40 +0000 (+0100) Subject: test: increase ping timeout when running in debug mode X-Git-Tag: v0.0.101~32^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=af4eb23a1cd56959a792dfa5c57723818f538713;p=rust-lightning test: increase ping timeout when running in debug mode --- diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index 4fdf2eeff..a0751a9d0 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -50,7 +50,13 @@ const FRESHNESS_TIMER: u64 = 60; #[cfg(test)] const FRESHNESS_TIMER: u64 = 1; +#[cfg(not(debug_assertions))] const PING_TIMER: u64 = 5; +/// Signature operations take a lot longer without compiler optimisations. +/// Increasing the ping timer allows for this but slower devices will be disconnected if the +/// timeout is reached. +#[cfg(debug_assertions)] +const PING_TIMER: u64 = 30; /// Trait which handles persisting a [`ChannelManager`] to disk. ///