Skip to content
Prev Previous commit
Next Next commit
Shorten node ann. broadcast timer in tests
  • Loading branch information
tnull committed May 30, 2024
commit 1e522d06e48e6b67b499d63e449d2bae2dcc59de
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,10 @@ impl Node {
let mut stop_bcast = self.stop_sender.subscribe();
runtime.spawn(async move {
// We check every 30 secs whether our last broadcast is NODE_ANN_BCAST_INTERVAL away.
#[cfg(not(test))]
let mut interval = tokio::time::interval(Duration::from_secs(30));
#[cfg(test)]
let mut interval = tokio::time::interval(Duration::from_secs(5));
loop {
tokio::select! {
_ = stop_bcast.changed() => {
Expand Down