projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe8c10d
)
Speed up test_timer_tick_called
author
Jeffrey Czyz
<jkczyz@gmail.com>
Mon, 4 Oct 2021 21:06:38 +0000
(16:06 -0500)
committer
Jeffrey Czyz
<jkczyz@gmail.com>
Wed, 13 Oct 2021 15:25:18 +0000
(10:25 -0500)
lightning-background-processor/src/lib.rs
patch
|
blob
|
history
diff --git
a/lightning-background-processor/src/lib.rs
b/lightning-background-processor/src/lib.rs
index c7d55ae61b7ecdc9ebb586654efd76a0dd650397..fd1ad6fe2881f6505d12d83d0050aedc102c4aa0 100644
(file)
--- 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(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.
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;
const PING_TIMER: u64 = 30;
+#[cfg(test)]
+const PING_TIMER: u64 = 1;
/// Trait which handles persisting a [`ChannelManager`] to disk.
///
/// Trait which handles persisting a [`ChannelManager`] to disk.
///