Skip to content

Commit d5a1435

Browse files
committed
Log gossip rejections due to stale channel_updates at GOSSIP level
This further reduces noise at the TRACE level during initial gossip sync.
1 parent 2a8a396 commit d5a1435

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
@@ -1168,10 +1168,10 @@ impl NetworkGraph {
11681168
// disable this check during tests!
11691169
let time = SystemTime::now().duration_since(UNIX_EPOCH).expect("Time must be > 1970").as_secs();
11701170
if (msg.timestamp as u64) < time - STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS {
1171-
return Err(LightningError{err: "channel_update is older than two weeks old".to_owned(), action: ErrorAction::IgnoreError});
1171+
return Err(LightningError{err: "channel_update is older than two weeks old".to_owned(), action: ErrorAction::IgnoreAndLog(Level::Gossip)});
11721172
}
11731173
if msg.timestamp as u64 > time + 60 * 60 * 24 {
1174-
return Err(LightningError{err: "channel_update has a timestamp more than a day in the future".to_owned(), action: ErrorAction::IgnoreError});
1174+
return Err(LightningError{err: "channel_update has a timestamp more than a day in the future".to_owned(), action: ErrorAction::IgnoreAndLog(Level::Gossip)});
11751175
}
11761176
}
11771177

0 commit comments

Comments
 (0)