From 7263bf5ab493fca498101e2365b3016c16ce1201 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 27 Oct 2022 18:01:44 +0000 Subject: [PATCH] Prune the network graph immediately prior to generating updates --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5