What changed, and why it matters
This is a trivial code cleanup: a developer removed a temporary variable that held an error message and instead put the message text directly into the logging call. The program's behavior, error messages, and security posture are unchanged.
No action needed; this is a non-security refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit inlines a format! string previously assigned to error into the log_error! macro call. The resulting log line is identical, and the returned APIError::ChannelUnavailable is untouched. There are no functional changes.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +1 / −4
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index d84d46e..8486cd4 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -6740,16 +6740,13 @@ where
}
},
None => {
- let error = format!(
- "Channel not found for the passed counterparty node_id {next_node_id}"
- );
let logger = WithContext::from(
&self.logger,
Some(next_node_id),
Some(*next_hop_channel_id),
None,
);
- log_error!(logger, "{error} when attempting to forward intercepted HTLC");
+ log_error!(logger, "Channel not found for the passed counterparty node_id {next_node_id} when attempting to forward intercepted HTLC");
return Err(APIError::ChannelUnavailable {
err: format!(
"Channel with id {next_hop_channel_id} not found for the passed counterparty node_id {next_node_id}"
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.