@@ -55,7 +55,7 @@ use util::config::{UserConfig, ChannelConfig};
55
55
use util:: events:: { EventHandler , EventsProvider , MessageSendEvent , MessageSendEventsProvider , ClosureReason , HTLCDestination } ;
56
56
use util:: { byte_utils, events} ;
57
57
use util:: crypto:: sign;
58
- use util:: wakers:: PersistenceNotifier ;
58
+ use util:: wakers:: Notifier ;
59
59
use util:: scid_utils:: fake_scid;
60
60
use util:: ser:: { BigSize , FixedLengthReader , Readable , ReadableArgs , MaybeReadable , Writeable , Writer , VecWriter } ;
61
61
use util:: logger:: { Level , Logger } ;
@@ -790,10 +790,10 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
790
790
/// Taken first everywhere where we are making changes before any other locks.
791
791
/// When acquiring this lock in read mode, rather than acquiring it directly, call
792
792
/// `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.
794
794
total_consistency_lock : RwLock < ( ) > ,
795
795
796
- persistence_notifier : PersistenceNotifier ,
796
+ persistence_notifier : Notifier ,
797
797
798
798
keys_manager : K ,
799
799
@@ -833,18 +833,18 @@ enum NotifyOption {
833
833
/// notify or not based on whether relevant changes have been made, providing a closure to
834
834
/// `optionally_notify` which returns a `NotifyOption`.
835
835
struct PersistenceNotifierGuard < ' a , F : Fn ( ) -> NotifyOption > {
836
- persistence_notifier : & ' a PersistenceNotifier ,
836
+ persistence_notifier : & ' a Notifier ,
837
837
should_persist : F ,
838
838
// We hold onto this result so the lock doesn't get released immediately.
839
839
_read_guard : RwLockReadGuard < ' a , ( ) > ,
840
840
}
841
841
842
842
impl < ' 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 > {
844
844
PersistenceNotifierGuard :: optionally_notify ( lock, notifier, || -> NotifyOption { NotifyOption :: DoPersist } )
845
845
}
846
846
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 > {
848
848
let read_guard = lock. read ( ) . unwrap ( ) ;
849
849
850
850
PersistenceNotifierGuard {
@@ -1625,7 +1625,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1625
1625
pending_events : Mutex :: new ( Vec :: new ( ) ) ,
1626
1626
pending_background_events : Mutex :: new ( Vec :: new ( ) ) ,
1627
1627
total_consistency_lock : RwLock :: new ( ( ) ) ,
1628
- persistence_notifier : PersistenceNotifier :: new ( ) ,
1628
+ persistence_notifier : Notifier :: new ( ) ,
1629
1629
1630
1630
keys_manager,
1631
1631
@@ -7240,7 +7240,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
7240
7240
pending_events : Mutex :: new ( pending_events_read) ,
7241
7241
pending_background_events : Mutex :: new ( pending_background_events_read) ,
7242
7242
total_consistency_lock : RwLock :: new ( ( ) ) ,
7243
- persistence_notifier : PersistenceNotifier :: new ( ) ,
7243
+ persistence_notifier : Notifier :: new ( ) ,
7244
7244
7245
7245
keys_manager : args. keys_manager ,
7246
7246
logger : args. logger ,
0 commit comments