Skip to content

Commit 3ca6342

Browse files
authored
Merge pull request #1220 from TheBlueMatt/2021-12-stale-update-gossip-log
Log gossip rejections due to stale channel_updates at GOSSIP level
2 parents 036ea11 + d5a1435 commit 3ca6342

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,10 +1170,10 @@ impl NetworkGraph {
11701170
// disable this check during tests!
11711171
let time = SystemTime::now().duration_since(UNIX_EPOCH).expect("Time must be > 1970").as_secs();
11721172
if (msg.timestamp as u64) < time - STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS {
1173-
return Err(LightningError{err: "channel_update is older than two weeks old".to_owned(), action: ErrorAction::IgnoreError});
1173+
return Err(LightningError{err: "channel_update is older than two weeks old".to_owned(), action: ErrorAction::IgnoreAndLog(Level::Gossip)});
11741174
}
11751175
if msg.timestamp as u64 > time + 60 * 60 * 24 {
1176-
return Err(LightningError{err: "channel_update has a timestamp more than a day in the future".to_owned(), action: ErrorAction::IgnoreError});
1176+
return Err(LightningError{err: "channel_update has a timestamp more than a day in the future".to_owned(), action: ErrorAction::IgnoreAndLog(Level::Gossip)});
11771177
}
11781178
}
11791179

0 commit comments

Comments
 (0)