@@ -55,7 +55,7 @@ use util::config::{UserConfig, ChannelConfig};
5555use util:: events:: { EventHandler , EventsProvider , MessageSendEvent , MessageSendEventsProvider , ClosureReason , HTLCDestination } ;
5656use util:: { byte_utils, events} ;
5757use util:: crypto:: sign;
58- use util:: wakers:: PersistenceNotifier ;
58+ use util:: wakers:: Notifier ;
5959use util:: scid_utils:: fake_scid;
6060use util:: ser:: { BigSize , FixedLengthReader , Readable , ReadableArgs , MaybeReadable , Writeable , Writer , VecWriter } ;
6161use util:: logger:: { Level , Logger } ;
@@ -790,10 +790,10 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
790790 /// Taken first everywhere where we are making changes before any other locks.
791791 /// When acquiring this lock in read mode, rather than acquiring it directly, call
792792 /// `PersistenceNotifierGuard::notify_on_drop(..)` and pass the lock to it, to ensure the
793- /// PersistenceNotifier the lock contains sends out a notification when the lock is released.
793+ /// Notifier the lock contains sends out a notification when the lock is released.
794794 total_consistency_lock : RwLock < ( ) > ,
795795
796- persistence_notifier : PersistenceNotifier ,
796+ persistence_notifier : Notifier ,
797797
798798 keys_manager : K ,
799799
@@ -833,18 +833,18 @@ enum NotifyOption {
833833/// notify or not based on whether relevant changes have been made, providing a closure to
834834/// `optionally_notify` which returns a `NotifyOption`.
835835struct PersistenceNotifierGuard < ' a , F : Fn ( ) -> NotifyOption > {
836- persistence_notifier : & ' a PersistenceNotifier ,
836+ persistence_notifier : & ' a Notifier ,
837837 should_persist : F ,
838838 // We hold onto this result so the lock doesn't get released immediately.
839839 _read_guard : RwLockReadGuard < ' a , ( ) > ,
840840}
841841
842842impl < ' a > PersistenceNotifierGuard < ' a , fn ( ) -> NotifyOption > { // We don't care what the concrete F is here, it's unused
843- fn notify_on_drop ( lock : & ' a RwLock < ( ) > , notifier : & ' a PersistenceNotifier ) -> PersistenceNotifierGuard < ' a , impl Fn ( ) -> NotifyOption > {
843+ fn notify_on_drop ( lock : & ' a RwLock < ( ) > , notifier : & ' a Notifier ) -> PersistenceNotifierGuard < ' a , impl Fn ( ) -> NotifyOption > {
844844 PersistenceNotifierGuard :: optionally_notify ( lock, notifier, || -> NotifyOption { NotifyOption :: DoPersist } )
845845 }
846846
847- fn optionally_notify < F : Fn ( ) -> NotifyOption > ( lock : & ' a RwLock < ( ) > , notifier : & ' a PersistenceNotifier , persist_check : F ) -> PersistenceNotifierGuard < ' a , F > {
847+ fn optionally_notify < F : Fn ( ) -> NotifyOption > ( lock : & ' a RwLock < ( ) > , notifier : & ' a Notifier , persist_check : F ) -> PersistenceNotifierGuard < ' a , F > {
848848 let read_guard = lock. read ( ) . unwrap ( ) ;
849849
850850 PersistenceNotifierGuard {
@@ -1625,7 +1625,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
16251625 pending_events : Mutex :: new ( Vec :: new ( ) ) ,
16261626 pending_background_events : Mutex :: new ( Vec :: new ( ) ) ,
16271627 total_consistency_lock : RwLock :: new ( ( ) ) ,
1628- persistence_notifier : PersistenceNotifier :: new ( ) ,
1628+ persistence_notifier : Notifier :: new ( ) ,
16291629
16301630 keys_manager,
16311631
@@ -7240,7 +7240,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
72407240 pending_events : Mutex :: new ( pending_events_read) ,
72417241 pending_background_events : Mutex :: new ( pending_background_events_read) ,
72427242 total_consistency_lock : RwLock :: new ( ( ) ) ,
7243- persistence_notifier : PersistenceNotifier :: new ( ) ,
7243+ persistence_notifier : Notifier :: new ( ) ,
72447244
72457245 keys_manager : args. keys_manager ,
72467246 logger : args. logger ,
0 commit comments