Skip to content

Commit cd73972

Browse files
committed
f make tracking atomic not-test-only
1 parent 345e3d1 commit cd73972

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,6 @@ where
10981098
/// Notifier the lock contains sends out a notification when the lock is released.
10991099
total_consistency_lock: RwLock<()>,
11001100

1101-
#[cfg(debug_assertions)]
11021101
background_events_processed_since_startup: AtomicBool,
11031102

11041103
persistence_notifier: Notifier,
@@ -1872,9 +1871,7 @@ macro_rules! handle_new_monitor_update {
18721871
// update_maps_on_chan_removal needs to be able to take id_to_peer, so make sure we can in
18731872
// any case so that it won't deadlock.
18741873
debug_assert_ne!($self.id_to_peer.held_by_thread(), LockHeldState::HeldByThread);
1875-
#[cfg(debug_assertions)] {
1876-
debug_assert!($self.background_events_processed_since_startup.load(Ordering::Acquire));
1877-
}
1874+
debug_assert!($self.background_events_processed_since_startup.load(Ordering::Acquire));
18781875
match $update_res {
18791876
ChannelMonitorUpdateStatus::InProgress => {
18801877
log_debug!($self.logger, "ChannelMonitor update for {} in flight, holding messages until the update completes.",
@@ -2060,7 +2057,6 @@ where
20602057
pending_events_processor: AtomicBool::new(false),
20612058
pending_background_events: Mutex::new(Vec::new()),
20622059
total_consistency_lock: RwLock::new(()),
2063-
#[cfg(debug_assertions)]
20642060
background_events_processed_since_startup: AtomicBool::new(false),
20652061
persistence_notifier: Notifier::new(),
20662062

@@ -4097,7 +4093,6 @@ where
40974093
fn process_background_events(&self) -> NotifyOption {
40984094
debug_assert_ne!(self.total_consistency_lock.held_by_thread(), LockHeldState::NotHeldByThread);
40994095

4100-
#[cfg(debug_assertions)]
41014096
self.background_events_processed_since_startup.store(true, Ordering::Release);
41024097

41034098
let mut background_events = Vec::new();

0 commit comments

Comments
 (0)