Rustfmt ChannelManager::internal_tx_abort
What changed, and why it matters
This commit is purely a formatting cleanup. It removes a #[rustfmt::skip] annotation and lets the Rust formatter reformat the internal_tx_abort function. No code behavior, logic, or security properties were changed.
No action needed. This is a non-functional style-only change.
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_tx_abort. The function signature, variable names, control flow, error handling, and event construction remain identical. There are no functional changes.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +25 / −21
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index dfdbfe4..3a3003e 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -11477,21 +11477,21 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
}
}
- #[rustfmt::skip]
- fn internal_tx_abort(&self, counterparty_node_id: &PublicKey, msg: &msgs::TxAbort)
- -> Result<NotifyOption, MsgHandleErrInternal> {
+ fn internal_tx_abort(
+ &self, counterparty_node_id: &PublicKey, msg: &msgs::TxAbort,
+ ) -> Result<NotifyOption, 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) {
hash_map::Entry::Occupied(mut chan_entry) => {
let res = chan_entry.get_mut().tx_abort(msg, &self.logger);
- let (tx_abort, splice_failed) = try_channel_entry!(self, peer_state, res, chan_entry);
+ let (tx_abort, splice_failed) =
+ try_channel_entry!(self, peer_state, res, chan_entry);
let persist = if tx_abort.is_some() || splice_failed.is_some() {
NotifyOption::DoPersist
@@ -11508,22 +11508,26 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
if let Some(splice_funding_failed) = splice_failed {
let pending_events = &mut self.pending_events.lock().unwrap();
- pending_events.push_back((events::Event::SpliceFailed {
- channel_id: msg.channel_id,
- counterparty_node_id: *counterparty_node_id,
- user_channel_id: chan_entry.get().context().get_user_id(),
- abandoned_funding_txo: splice_funding_failed.funding_txo,
- channel_type: splice_funding_failed.channel_type,
- contributed_inputs: splice_funding_failed.contributed_inputs,
- contributed_outputs: splice_funding_failed.contributed_outputs,
- }, None));
+ pending_events.push_back((
+ events::Event::SpliceFailed {
+ channel_id: msg.channel_id,
+ counterparty_node_id: *counterparty_node_id,
+ user_channel_id: chan_entry.get().context().get_user_id(),
+ abandoned_funding_txo: splice_funding_failed.funding_txo,
+ channel_type: splice_funding_failed.channel_type,
+ contributed_inputs: splice_funding_failed.contributed_inputs,
+ contributed_outputs: splice_funding_failed.contributed_outputs,
+ },
+ None,
+ ));
}
Ok(persist)
},
- 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.