@@ -437,7 +437,7 @@ pub struct ProbabilisticScoringParameters {
437
437
/// Note that 16 or more half lives guarantees that all historical data will be wiped.
438
438
///
439
439
/// Default value: 14 days
440
- pub no_updates_historical_half_life : Duration ,
440
+ pub historical_no_updates_half_life : Duration ,
441
441
442
442
/// Manual penalties used for the given nodes. Allows to set a particular penalty for a given
443
443
/// node. Note that a manual penalty of `u64::max_value()` means the node would not ever be
@@ -653,7 +653,7 @@ impl ProbabilisticScoringParameters {
653
653
liquidity_penalty_amount_multiplier_msat : 0 ,
654
654
historical_liquidity_penalty_multiplier_msat : 0 ,
655
655
historical_liquidity_penalty_amount_multiplier_msat : 0 ,
656
- no_updates_historical_half_life : Duration :: from_secs ( 60 * 60 * 24 * 14 ) ,
656
+ historical_no_updates_half_life : Duration :: from_secs ( 60 * 60 * 24 * 14 ) ,
657
657
manual_node_penalties : HashMap :: new ( ) ,
658
658
anti_probing_penalty_msat : 0 ,
659
659
considered_impossible_penalty_msat : 0 ,
@@ -679,7 +679,7 @@ impl Default for ProbabilisticScoringParameters {
679
679
liquidity_penalty_amount_multiplier_msat : 192 ,
680
680
historical_liquidity_penalty_multiplier_msat : 10_000 ,
681
681
historical_liquidity_penalty_amount_multiplier_msat : 64 ,
682
- no_updates_historical_half_life : Duration :: from_secs ( 60 * 60 * 24 * 14 ) ,
682
+ historical_no_updates_half_life : Duration :: from_secs ( 60 * 60 * 24 * 14 ) ,
683
683
manual_node_penalties : HashMap :: new ( ) ,
684
684
anti_probing_penalty_msat : 250 ,
685
685
considered_impossible_penalty_msat : 1_0000_0000_000 ,
@@ -820,7 +820,7 @@ impl<L: Deref<Target = u64>, BRT: Deref<Target = HistoricalBucketRangeTracker>,
820
820
// bucket.
821
821
let mut total_valid_points_tracked = 0 ;
822
822
let decays = self . now . duration_since ( * self . last_updated ) . as_secs ( )
823
- . checked_div ( params. no_updates_historical_half_life . as_secs ( ) )
823
+ . checked_div ( params. historical_no_updates_half_life . as_secs ( ) )
824
824
. map ( |decays| cmp:: min ( decays, u32:: max_value ( ) as u64 ) as u32 )
825
825
. unwrap_or ( u32:: max_value ( ) ) ;
826
826
// Rather than actually decaying the individual buckets, which would lose precision, we
@@ -946,7 +946,7 @@ impl<L: DerefMut<Target = u64>, BRT: DerefMut<Target = HistoricalBucketRangeTrac
946
946
947
947
fn update_history_buckets ( & mut self ) {
948
948
let half_lives = self . now . duration_since ( * self . last_updated ) . as_secs ( )
949
- . checked_div ( self . params . no_updates_historical_half_life . as_secs ( ) )
949
+ . checked_div ( self . params . historical_no_updates_half_life . as_secs ( ) )
950
950
. map ( |v| v. try_into ( ) . unwrap_or ( u32:: max_value ( ) ) ) . unwrap_or ( u32:: max_value ( ) ) ;
951
951
self . min_liquidity_offset_history . decay_data ( half_lives) ;
952
952
self . max_liquidity_offset_history . decay_data ( half_lives) ;
0 commit comments