From accc8cefd62ebfa63e9b81a77212fd4e7d1933c5 Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Mon, 27 May 2024 15:11:38 +0200 Subject: [PATCH] Change periodic route announcement to 5 minutes More delay between periodic announcements. This is mainly to observe the effect on a larget scale in preparation for #253. Signed-off-by: Lee Smet --- CHANGELOG.md | 1 + mycelium/src/router.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f49199f..e2bc2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 route to it is lost as a result of the next-hop dying, or and update coming in which causes no routes to be feasible anymore. - Switched from the log to the tracing ecosystem. +- Only do the periodic route announcement every 5 minutes instead of every minute. ### Fixed diff --git a/mycelium/src/router.rs b/mycelium/src/router.rs index 7ea4c87..49b8b5e 100644 --- a/mycelium/src/router.rs +++ b/mycelium/src/router.rs @@ -33,7 +33,7 @@ const HELLO_INTERVAL: u64 = 20; const IHU_INTERVAL: Duration = Duration::from_secs(HELLO_INTERVAL * 3); /// Max time used in UPDATE packets. For local (static) routes this is the timeout they are /// advertised with. -const UPDATE_INTERVAL: Duration = Duration::from_secs(HELLO_INTERVAL * 3); +const UPDATE_INTERVAL: Duration = Duration::from_secs(HELLO_INTERVAL * 3 * 5); /// Time between route table dumps to peers. const ROUTE_PROPAGATION_INTERVAL: Duration = UPDATE_INTERVAL; /// Amount of seconds that can elapse before we consider a [`Peer`] as dead from the routers POV.