Skip to content

Commit 0386410

Browse files
committed
Speed up test_timer_tick_called
1 parent d2bb728 commit 0386410

File tree

1 file changed

+4
-2
lines changed
  • lightning-background-processor/src

1 file changed

+4
-2
lines changed

lightning-background-processor/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ const FRESHNESS_TIMER: u64 = 60;
6060
#[cfg(test)]
6161
const FRESHNESS_TIMER: u64 = 1;
6262

63-
#[cfg(not(debug_assertions))]
63+
#[cfg(all(not(test), not(debug_assertions)))]
6464
const PING_TIMER: u64 = 5;
6565
/// Signature operations take a lot longer without compiler optimisations.
6666
/// Increasing the ping timer allows for this but slower devices will be disconnected if the
6767
/// timeout is reached.
68-
#[cfg(debug_assertions)]
68+
#[cfg(all(not(test), debug_assertions))]
6969
const PING_TIMER: u64 = 30;
70+
#[cfg(test)]
71+
const PING_TIMER: u64 = 1;
7072

7173
/// Trait which handles persisting a [`ChannelManager`] to disk.
7274
///

0 commit comments

Comments
 (0)