Skip to content

Commit 5b583a9

Browse files
committed
Re-introduce 2-second initial forwarding delay
On startup, we wait a bit before attempting the initial forward, which gives the user some time to re-connect peers.
1 parent 8e67c49 commit 5b583a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning-background-processor/src/fwd_batch.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99

1010
use core::time::Duration;
1111

12+
// On startup, we wait a bit before attempting the initial forward, which gives the user some time
13+
// to re-connect peers.
14+
const INIT_FWD_DELAY: Duration = Duration::from_secs(2);
15+
1216
pub(crate) struct BatchDelay {
1317
next_batch_delay: Duration,
1418
}
1519

1620
impl BatchDelay {
1721
pub(crate) fn new() -> Self {
18-
let next_batch_delay = rand_batch_delay();
22+
let next_batch_delay = INIT_FWD_DELAY;
1923
Self { next_batch_delay }
2024
}
2125

0 commit comments

Comments
 (0)