X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-background-processor%2Fsrc%2Flib.rs;h=a0751a9d0f4b3055fdb605a95c46033f55ce0e2b;hb=af4eb23a1cd56959a792dfa5c57723818f538713;hp=4fdf2eeff03e298cc9dda25fb28739101f361fcf;hpb=803d8041f143469993620ed75e84cba226b860fa;p=rust-lightning diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index 4fdf2eef..a0751a9d 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. ///