Skip to content

Commit

Permalink
Speed up test_timer_tick_called
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz committed Oct 13, 2021
1 parent d2bb728 commit 0386410
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lightning-background-processor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit 0386410

Please sign in to comment.