Log unknown channel_update with dont_forward at debug level instead of warn
What changed, and why it matters
This commit simply changes one log message from 'warning' level to 'debug' level. It does not fix a security bug, change any behavior, or alter how the software processes network messages. The change reduces log noise when LDK receives a channel_update it does not recognize.
No security action required. Treat as routine logging cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch downgrades a single log_warn! to log_debug! in ChannelManager::internal_channel_update handling of an unknown channel_update with the dont_forward bit set. The return value and all control flow remain identical (Ok(NotifyOption::SkipPersistNoEvents)). A corresponding unit test is renamed and presumably updated to expect a debug log instead of a warning log. No cryptographic, network, or state-machine behavior is modified.
Changed components
lightning/src/ln/channelmanager.rs logging onlyInspect captured patch +2 / −2
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 56e9732..565cfa0 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -12291,7 +12291,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
None => {
// It's not a local channel
if msg.contents.message_flags & (1 << 1) != 0 {
- log_warn!(self.logger, "Received channel_update for unknown channel {} with dont_forward set.\n\tYou may wish to check if an incorrect tx_index was passed to chain::Confirm::transactions_confirmed.", msg.contents.short_channel_id);
+ log_debug!(self.logger, "Received channel_update for unknown channel {} with dont_forward set. You may wish to check if an incorrect tx_index was passed to chain::Confirm::transactions_confirmed.", msg.contents.short_channel_id);
}
return Ok(NotifyOption::SkipPersistNoEvents)
}
diff --git a/lightning/src/ln/priv_short_conf_tests.rs b/lightning/src/ln/priv_short_conf_tests.rs
index ed7f757..14a3438 100644
--- a/lightning/src/ln/priv_short_conf_tests.rs
+++ b/lightning/src/ln/priv_short_conf_tests.rs
@@ -1614,7 +1614,7 @@ fn test_channel_update_dont_forward_flag() {
}
#[test]
-fn test_unknown_channel_update_with_dont_forward_logs_warning() {
+fn test_unknown_channel_update_with_dont_forward_logs_debug() {
use bitcoin::constants::ChainHash;
use bitcoin::secp256k1::ecdsa::Signature;
use bitcoin::secp256k1::ffi::Signature as FFISignature;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.