From d24839740b44048568341ca37e289557eff52fd9 Mon Sep 17 00:00:00 2001 From: Orbital Date: Tue, 6 Feb 2024 15:26:07 -0600 Subject: [PATCH] Boost node announcement interval We broadcast the node announcement at a more frequent interval for lndk's integration tests. --- src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1cf6626..807cb32 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1002,11 +1002,8 @@ pub async fn start_ldk(args: config::LdkUserInfo, test_name: &str) -> node_api:: let peer_man = Arc::clone(&peer_manager); let chan_man = Arc::clone(&channel_manager); tokio::spawn(async move { - // First wait a minute until we have some peers and maybe have opened a channel. - tokio::time::sleep(Duration::from_secs(60)).await; - // Then, update our announcement once an hour to keep it fresh but avoid unnecessary churn - // in the global gossip network. - let mut interval = tokio::time::interval(Duration::from_secs(3600)); + // Announce our node at a frequent interval for lndk's integration tests. + let mut interval = tokio::time::interval(Duration::from_secs(20)); loop { interval.tick().await; // Don't bother trying to announce if we don't have any public channls, though our