Skip to content

Commit

Permalink
Merge pull request #11 from lndk-org/change-node-announcement-interval
Browse files Browse the repository at this point in the history
Boost node announcement interval
  • Loading branch information
orbitalturtle authored Feb 6, 2024
2 parents 1624431 + d248397 commit 950464a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 950464a

Please sign in to comment.