Browse Source

Increase heartbeat interval in debug builds

When running in debug mode, the timeout was getting triggered during the
contract setup phase.
debug-collab-settlement
Mariusz Klochowicz 3 years ago
parent
commit
0984111425
No known key found for this signature in database GPG Key ID: 470C865699C8D4D
  1. 7
      daemon/src/lib.rs

7
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;

Loading…
Cancel
Save