We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faa3bc5 commit 4e7d5d7Copy full SHA for 4e7d5d7
lightning/src/routing/network_graph.rs
@@ -1090,7 +1090,8 @@ impl NetworkGraph {
1090
pub fn remove_stale_channels_with_time(&self, current_time_unix: u64) {
1091
let mut channels = self.channels.write().unwrap();
1092
// Time out if we haven't received an update in at least 14 days.
1093
- if current_time_unix > u32::max_value() { return; } // Remove by 2106
+ if current_time_unix > u32::max_value() as u64 { return; } // Remove by 2106
1094
+ if current_time_unix < STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS { return; }
1095
let min_time_unix: u32 = (current_time_unix - STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS) as u32;
1096
// Sadly BTreeMap::retain was only stabilized in 1.53 so we can't switch to it for some
1097
// time.
0 commit comments