Log broadcast of interactive funding transaction
What changed, and why it matters
This commit only adds a log message when an interactive funding transaction is broadcast, and refactors three call sites to use a shared helper function. It does not change any security-critical behavior, transaction validation, or network logic. There is no indication of a vulnerability being fixed.
No security action required. Treat as a routine observability/refactoring commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies broadcast_interactive_funding in lightning/src/ln/channelmanager.rs to accept a logger and emit an log_info! message including the funding transaction ID. It also consolidates three previously separate broadcast code paths so they all call this helper. The actual broadcast call (self.tx_broadcaster.broadcast_transactions) and the pending-event emission remain unchanged. No validation, cryptography, or state-machine logic is altered.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +14 / −8
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index d45939f..4c96f5d 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -6438,7 +6438,11 @@ where
splice_negotiated,
}) => {
if let Some(funding_tx) = funding_tx {
- self.broadcast_interactive_funding(chan, &funding_tx);
+ self.broadcast_interactive_funding(
+ chan,
+ &funding_tx,
+ &self.logger,
+ );
}
if let Some(splice_negotiated) = splice_negotiated {
self.pending_events.lock().unwrap().push_back((
@@ -6501,8 +6505,14 @@ where
}
fn broadcast_interactive_funding(
- &self, channel: &mut FundedChannel<SP>, funding_tx: &Transaction,
+ &self, channel: &mut FundedChannel<SP>, funding_tx: &Transaction, logger: &L,
) {
+ let logger = WithChannelContext::from(logger, channel.context(), None);
+ log_info!(
+ logger,
+ "Broadcasting signed interactive funding transaction {}",
+ funding_tx.compute_txid()
+ );
self.tx_broadcaster.broadcast_transactions(&[funding_tx]);
{
let mut pending_events = self.pending_events.lock().unwrap();
@@ -9571,7 +9581,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
match channel.funding_transaction_signed(txid, vec![]) {
Ok(FundingTxSigned { tx_signatures: Some(tx_signatures), funding_tx, splice_negotiated }) => {
if let Some(funding_tx) = funding_tx {
- self.broadcast_interactive_funding(channel, &funding_tx);
+ self.broadcast_interactive_funding(channel, &funding_tx, &self.logger);
}
if let Some(splice_negotiated) = splice_negotiated {
@@ -10579,11 +10589,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
});
}
if let Some(ref funding_tx) = funding_tx {
- self.tx_broadcaster.broadcast_transactions(&[funding_tx]);
- {
- let mut pending_events = self.pending_events.lock().unwrap();
- emit_channel_pending_event!(pending_events, chan);
- }
+ self.broadcast_interactive_funding(chan, funding_tx, &self.logger);
}
if let Some(splice_negotiated) = splice_negotiated {
self.pending_events.lock().unwrap().push_back((
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.