]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Log gossip rejections due to stale channel_updates at GOSSIP level 2021-12-stale-update-gossip-log
authorMatt Corallo <git@bluematt.me>
Sun, 19 Dec 2021 20:13:38 +0000 (20:13 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 19 Dec 2021 20:13:38 +0000 (20:13 +0000)
This further reduces noise at the TRACE level during initial gossip
sync.

lightning/src/routing/network_graph.rs

index 8f3c44b80a754bf034921b16567aee184f874e45..e5961423fc2f3b7fa409d6b1b3ffce6c85a65cec 100644 (file)
@@ -1168,10 +1168,10 @@ impl NetworkGraph {
                        // disable this check during tests!
                        let time = SystemTime::now().duration_since(UNIX_EPOCH).expect("Time must be > 1970").as_secs();
                        if (msg.timestamp as u64) < time - STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS {
-                               return Err(LightningError{err: "channel_update is older than two weeks old".to_owned(), action: ErrorAction::IgnoreError});
+                               return Err(LightningError{err: "channel_update is older than two weeks old".to_owned(), action: ErrorAction::IgnoreAndLog(Level::Gossip)});
                        }
                        if msg.timestamp as u64 > time + 60 * 60 * 24 {
-                               return Err(LightningError{err: "channel_update has a timestamp more than a day in the future".to_owned(), action: ErrorAction::IgnoreError});
+                               return Err(LightningError{err: "channel_update has a timestamp more than a day in the future".to_owned(), action: ErrorAction::IgnoreAndLog(Level::Gossip)});
                        }
                }