Rustfmt ChannelManager::process_background_events
What changed, and why it matters
This commit is purely a code-formatting cleanup. It removes a `#[rustfmt::skip]` directive and lets Rustfmt reformat a single function in the Lightning channel manager. No behavior, logic, or security properties of the code change.
No security action needed. This is a cosmetic/style-only change and can be treated as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff only reformats ChannelManager::process_background_events in lightning/src/ln/channelmanager.rs. It removes #[rustfmt::skip], breaks a debug_assert_ne! call and a BackgroundEvent::MonitorUpdateRegeneratedOnStartup match arm across multiple lines, and adjusts indentation. There are no functional changes, no new imports, no altered control flow, and no modified semantics.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +16 / −4
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 3656a03..1c7a993 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -8140,9 +8140,11 @@ impl<
/// Free the background events, generally called from [`PersistenceNotifierGuard`] constructors.
///
/// Expects the caller to have a total_consistency_lock read lock.
- #[rustfmt::skip]
fn process_background_events(&self) -> NotifyOption {
- debug_assert_ne!(self.total_consistency_lock.held_by_thread(), LockHeldState::NotHeldByThread);
+ debug_assert_ne!(
+ self.total_consistency_lock.held_by_thread(),
+ LockHeldState::NotHeldByThread
+ );
self.background_events_processed_since_startup.store(true, Ordering::Release);
@@ -8154,8 +8156,18 @@ impl<
for event in background_events.drain(..) {
match event {
- BackgroundEvent::MonitorUpdateRegeneratedOnStartup { counterparty_node_id, funding_txo, channel_id, update } => {
- self.apply_post_close_monitor_update(counterparty_node_id, channel_id, funding_txo, update);
+ BackgroundEvent::MonitorUpdateRegeneratedOnStartup {
+ counterparty_node_id,
+ funding_txo,
+ channel_id,
+ update,
+ } => {
+ self.apply_post_close_monitor_update(
+ counterparty_node_id,
+ channel_id,
+ funding_txo,
+ update,
+ );
},
BackgroundEvent::MonitorUpdatesComplete {
counterparty_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.