X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-background-processor%2Fsrc%2Flib.rs;fp=lightning-background-processor%2Fsrc%2Flib.rs;h=fd1ad6fe2881f6505d12d83d0050aedc102c4aa0;hb=d7c8c8c57277f50437c0160679af14c256f55c06;hp=c7d55ae61b7ecdc9ebb586654efd76a0dd650397;hpb=fe8c10db95124e3238b7469bdabb00afc7c5bdd6;p=rust-lightning diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index c7d55ae6..fd1ad6fe 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -60,13 +60,15 @@ const FRESHNESS_TIMER: u64 = 60; #[cfg(test)] const FRESHNESS_TIMER: u64 = 1; -#[cfg(not(debug_assertions))] +#[cfg(all(not(test), 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)] +#[cfg(all(not(test), debug_assertions))] const PING_TIMER: u64 = 30; +#[cfg(test)] +const PING_TIMER: u64 = 1; /// Trait which handles persisting a [`ChannelManager`] to disk. ///