From: Matt Corallo Date: Thu, 27 Oct 2022 18:01:44 +0000 (+0000) Subject: Prune the network graph immediately prior to generating updates X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=7263bf5ab493fca498101e2365b3016c16ce1201;p=rapid-gossip-sync-server Prune the network graph immediately prior to generating updates --- diff --git a/src/lib.rs b/src/lib.rs index bf61b40..cc5a350 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -106,6 +106,8 @@ impl RapidSyncProcessor { async fn serialize_delta(network_graph: Arc>, last_sync_timestamp: u32, consider_intermediate_updates: bool) -> SerializedResponse { let (client, connection) = lookup::connect_to_db().await; + network_graph.remove_stale_channels_and_tracking(); + tokio::spawn(async move { if let Err(e) = connection.await { panic!("connection error: {}", e);