From 7126d051306fbb4c0e5a3621ade3e661aad0577d Mon Sep 17 00:00:00 2001 From: cloudhead Date: Mon, 29 Apr 2024 12:49:59 +0200 Subject: [PATCH] node: Use constant delay for refreshing node ann We use a shorter, constant delay, so that it is the same on all nodes. --- radicle-node/src/runtime.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicle-node/src/runtime.rs b/radicle-node/src/runtime.rs index 5c653ea2..3b55ac68 100644 --- a/radicle-node/src/runtime.rs +++ b/radicle-node/src/runtime.rs @@ -28,7 +28,7 @@ use crate::control; use crate::crypto::Signer; use crate::node::{routing, NodeId}; use crate::service::message::NodeAnnouncement; -use crate::service::{gossip, policy, Event}; +use crate::service::{gossip, policy, Event, INITIAL_SUBSCRIBE_BACKLOG_DELTA}; use crate::wire; use crate::wire::{Decode, Wire}; use crate::worker; @@ -175,7 +175,7 @@ impl Runtime { // If our announcement was made some time ago, the timestamp on it will be old, // and it might not get gossiped to new nodes since it will be purged from caches. // Therefore, we make sure it's never too old. - if clock - ann.timestamp.to_local_time() <= config.limits.gossip_max_age { + if clock - ann.timestamp.to_local_time() <= INITIAL_SUBSCRIBE_BACKLOG_DELTA { Some(ann) } else { None