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