Skip to content

Commit 559e90e

Browse files
committed
Prune stale channels from network graph after RGS sync
1 parent 8fcbe64 commit 559e90e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning-rapid-gossip-sync/src/processing.rs

+5
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ impl<NG: Deref<Target=NetworkGraph<L>>, L: Deref> RapidGossipSync<NG, L> where L
237237
}
238238

239239
self.network_graph.set_last_rapid_gossip_sync_timestamp(latest_seen_timestamp);
240+
241+
if let Some(time) = current_time_unix {
242+
self.network_graph.remove_stale_channels_and_tracking_with_time(time)
243+
}
244+
240245
self.is_initial_sync_complete.store(true, Ordering::Release);
241246
log_trace!(self.logger, "Done processing RGS data from {}", latest_seen_timestamp);
242247
Ok(latest_seen_timestamp)

0 commit comments

Comments
 (0)