@@ -338,7 +338,7 @@ pub(super) struct ChannelHolder<Signer: Sign> {
338
338
}
339
339
340
340
/// Events which we process internally but cannot be procsesed immediately at the generation site
341
- /// for some reason. They are handled in timer_chan_freshness_every_min , so may be processed with
341
+ /// for some reason. They are handled in timer_tick_occurred , so may be processed with
342
342
/// quite some time lag.
343
343
enum BackgroundEvent {
344
344
/// Handle a ChannelMonitorUpdate that closes a channel, broadcasting its current latest holder
@@ -403,7 +403,7 @@ pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, M, T, F, L> = ChannelManage
403
403
/// ChannelUpdate messages informing peers that the channel is temporarily disabled. To avoid
404
404
/// spam due to quick disconnection/reconnection, updates are not sent until the channel has been
405
405
/// offline for a full minute. In order to track this, you must call
406
- /// timer_chan_freshness_every_min roughly once per minute, though it doesn't have to be perfect.
406
+ /// timer_tick_occurred roughly once per minute, though it doesn't have to be perfect.
407
407
///
408
408
/// Rather than using a plain ChannelManager, it is preferable to use either a SimpleArcChannelManager
409
409
/// a SimpleRefChannelManager, for conciseness. See their documentation for more details, but
@@ -1959,10 +1959,10 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1959
1959
events. append ( & mut new_events) ;
1960
1960
}
1961
1961
1962
- /// Free the background events, generally called from timer_chan_freshness_every_min .
1962
+ /// Free the background events, generally called from timer_tick_occurred .
1963
1963
///
1964
1964
/// Exposed for testing to allow us to process events quickly without generating accidental
1965
- /// BroadcastChannelUpdate events in timer_chan_freshness_every_min .
1965
+ /// BroadcastChannelUpdate events in timer_tick_occurred .
1966
1966
///
1967
1967
/// Expects the caller to have a total_consistency_lock read lock.
1968
1968
fn process_background_events ( & self ) {
@@ -1991,7 +1991,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1991
1991
/// This method handles all the details, and must be called roughly once per minute.
1992
1992
///
1993
1993
/// Note that in some rare cases this may generate a `chain::Watch::update_channel` call.
1994
- pub fn timer_chan_freshness_every_min ( & self ) {
1994
+ pub fn timer_tick_occurred ( & self ) {
1995
1995
let _persistence_guard = PersistenceNotifierGuard :: new ( & self . total_consistency_lock , & self . persistence_notifier ) ;
1996
1996
self . process_background_events ( ) ;
1997
1997
@@ -3274,7 +3274,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
3274
3274
// We cannot broadcast our latest local state via monitor update (as
3275
3275
// Channel::force_shutdown tries to make us do) as we may still be in initialization,
3276
3276
// so we track the update internally and handle it when the user next calls
3277
- // timer_chan_freshness_every_min , guaranteeing we're running normally.
3277
+ // timer_tick_occurred , guaranteeing we're running normally.
3278
3278
if let Some ( ( funding_txo, update) ) = failure. 0 . take ( ) {
3279
3279
assert_eq ! ( update. updates. len( ) , 1 ) ;
3280
3280
if let ChannelMonitorUpdateStep :: ChannelForceClosed { should_broadcast } = update. updates [ 0 ] {
0 commit comments