Rustfmt ChannelManager::internal_splice_ack
What changed, and why it matters
This commit is purely a code-formatting cleanup. It removes a #[rustfmt::skip] annotation and lets Rustfmt reformat the internal_splice_ack function in the Lightning channel manager. No logic, behavior, or security properties of the code were changed.
No security action needed. This is a cosmetic/style commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff only adjusts whitespace, line breaks, and indentation in ChannelManager::internal_splice_ack. The function signature, variable names, method calls, error paths, and macro invocations remain identical. There are no functional changes, no new checks, no removed checks, and no changes to cryptographic or state-handling logic.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +27 / −13
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 3a3003e..89056ef 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -12571,33 +12571,47 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
}
/// Handle incoming splice request ack, transition channel to splice-pending (unless some check fails).
- #[rustfmt::skip]
- fn internal_splice_ack(&self, counterparty_node_id: &PublicKey, msg: &msgs::SpliceAck) -> Result<(), MsgHandleErrInternal> {
+ fn internal_splice_ack(
+ &self, counterparty_node_id: &PublicKey, msg: &msgs::SpliceAck,
+ ) -> 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;
// Look for the channel
match peer_state.channel_by_id.entry(msg.channel_id) {
- 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,
+ )),
hash_map::Entry::Occupied(mut chan_entry) => {
if let Some(ref mut funded_channel) = chan_entry.get_mut().as_funded_mut() {
let splice_ack_res = funded_channel.splice_ack(
- msg, &self.signer_provider, &self.entropy_source,
- &self.get_our_node_id(), &self.logger
+ msg,
+ &self.signer_provider,
+ &self.entropy_source,
+ &self.get_our_node_id(),
+ &self.logger,
);
- let tx_msg_opt = try_channel_entry!(self, peer_state, splice_ack_res, chan_entry);
+ let tx_msg_opt =
+ try_channel_entry!(self, peer_state, splice_ack_res, chan_entry);
if let Some(tx_msg) = tx_msg_opt {
- peer_state.pending_msg_events.push(tx_msg.into_msg_send_event(counterparty_node_id.clone()));
+ peer_state
+ .pending_msg_events
+ .push(tx_msg.into_msg_send_event(counterparty_node_id.clone()));
}
Ok(())
} else {
- try_channel_entry!(self, peer_state, Err(ChannelError::close("Channel is not funded, cannot be spliced".into())), chan_entry)
+ try_channel_entry!(
+ self,
+ peer_state,
+ Err(ChannelError::close("Channel is not funded, cannot be spliced".into())),
+ chan_entry
+ )
}
},
}
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.