diff --git a/daemon/src/lib.rs b/daemon/src/lib.rs index 8174ea4..d08ec17 100644 --- a/daemon/src/lib.rs +++ b/daemon/src/lib.rs @@ -52,7 +52,12 @@ pub mod wallet; pub mod wallet_sync; pub mod wire; -pub const HEARTBEAT_INTERVAL: std::time::Duration = Duration::from_secs(5); +// Certain operations (e.g. contract setup) take long time in debug mode, +// causing us to lag behind in processing heartbeats. +// Increasing the value for debug mode makes sure that we don't cause problems +// when testing / CI, whilst the release can still detect status faster +pub const HEARTBEAT_INTERVAL: std::time::Duration = + Duration::from_secs(if cfg!(debug_assertions) { 30 } else { 5 }); pub const N_PAYOUTS: usize = 200;