X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-background-processor%2Fsrc%2Flib.rs;h=34cddd1a6aa8b83ea36699e0bb39c4a21b97480a;hb=45853b3a956f83569dff1010a43a33c57487698a;hp=7284355c905badcd5beb981b77a1ed8cc68fd2ba;hpb=eb46f477f4b2459731e78c23423415cde278be09;p=rust-lightning diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index 7284355c..34cddd1a 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -51,7 +51,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. ///