Rustfmt ChannelManager::internal_tx_signatures
What changed, and why it matters
This commit is purely a code-formatting cleanup. It removes a manual 'do not format' marker from one function and lets the Rustfmt tool reformat the code. No logic, behavior, or security properties of the software were changed.
No security action needed. This is a cosmetic formatting change; normal code-review approval is sufficient.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the #[rustfmt::skip] attribute from ChannelManager::internal_tx_signatures and applies standard Rustfmt formatting: line wrapping, indentation, and argument alignment. The diff shows only whitespace and line-break changes; no expressions, control flow, types, or function signatures were modified. There is no functional or security change.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +31 / −21
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 9a62d77..dfdbfe4 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -11388,15 +11388,14 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
}
}
- #[rustfmt::skip]
- fn internal_tx_signatures(&self, counterparty_node_id: &PublicKey, msg: &msgs::TxSignatures)
- -> Result<(), MsgHandleErrInternal> {
+ fn internal_tx_signatures(
+ &self, counterparty_node_id: &PublicKey, msg: &msgs::TxSignatures,
+ ) -> Result<(), MsgHandleErrInternal> {
let per_peer_state = self.per_peer_state.read().unwrap();
- let peer_state_mutex = per_peer_state.get(counterparty_node_id)
- .ok_or_else(|| {
- debug_assert!(false);
- MsgHandleErrInternal::no_such_peer(counterparty_node_id, msg.channel_id)
- })?;
+ let peer_state_mutex = per_peer_state.get(counterparty_node_id).ok_or_else(|| {
+ debug_assert!(false);
+ MsgHandleErrInternal::no_such_peer(counterparty_node_id, msg.channel_id)
+ })?;
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
let peer_state = &mut *peer_state_lock;
match peer_state.channel_by_id.entry(msg.channel_id) {
@@ -11424,19 +11423,28 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
debug_assert!(counterparty_initial_commitment_signed_result.is_none());
if let Some(tx_signatures) = tx_signatures {
- peer_state.pending_msg_events.push(MessageSendEvent::SendTxSignatures {
- node_id: *counterparty_node_id,
- msg: tx_signatures,
- });
+ peer_state.pending_msg_events.push(
+ MessageSendEvent::SendTxSignatures {
+ node_id: *counterparty_node_id,
+ msg: tx_signatures,
+ },
+ );
}
if let Some(splice_locked) = splice_locked {
- peer_state.pending_msg_events.push(MessageSendEvent::SendSpliceLocked {
- node_id: *counterparty_node_id,
- msg: splice_locked,
- });
+ peer_state.pending_msg_events.push(
+ MessageSendEvent::SendSpliceLocked {
+ node_id: *counterparty_node_id,
+ msg: splice_locked,
+ },
+ );
}
if let Some((ref funding_tx, ref tx_type)) = funding_tx {
- self.broadcast_interactive_funding(chan, funding_tx, Some(tx_type.clone()), &self.logger);
+ self.broadcast_interactive_funding(
+ chan,
+ funding_tx,
+ Some(tx_type.clone()),
+ &self.logger,
+ );
}
if let Some(splice_negotiated) = splice_negotiated {
self.pending_events.lock().unwrap().push_back((
@@ -11446,7 +11454,8 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
user_channel_id: chan.context.get_user_id(),
new_funding_txo: splice_negotiated.funding_txo,
channel_type: splice_negotiated.channel_type,
- new_funding_redeem_script: splice_negotiated.funding_redeem_script,
+ new_funding_redeem_script: splice_negotiated
+ .funding_redeem_script,
},
None,
));
@@ -11461,9 +11470,10 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
}
Ok(())
},
- hash_map::Entry::Vacant(_) => {
- Err(MsgHandleErrInternal::no_such_channel_for_peer(counterparty_node_id, msg.channel_id))
- }
+ hash_map::Entry::Vacant(_) => Err(MsgHandleErrInternal::no_such_channel_for_peer(
+ counterparty_node_id,
+ msg.channel_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.