Skip to content

Commit 4775973

Browse files
committed
f alt name
1 parent 2c57089 commit 4775973

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning/src/routing/scoring.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ pub struct ProbabilisticScoringParameters {
437437
/// Note that 16 or more half lives guarantees that all historical data will be wiped.
438438
///
439439
/// Default value: 14 days
440-
pub no_updates_historical_half_life: Duration,
440+
pub historical_no_updates_half_life: Duration,
441441

442442
/// Manual penalties used for the given nodes. Allows to set a particular penalty for a given
443443
/// node. Note that a manual penalty of `u64::max_value()` means the node would not ever be
@@ -653,7 +653,7 @@ impl ProbabilisticScoringParameters {
653653
liquidity_penalty_amount_multiplier_msat: 0,
654654
historical_liquidity_penalty_multiplier_msat: 0,
655655
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),
657657
manual_node_penalties: HashMap::new(),
658658
anti_probing_penalty_msat: 0,
659659
considered_impossible_penalty_msat: 0,
@@ -679,7 +679,7 @@ impl Default for ProbabilisticScoringParameters {
679679
liquidity_penalty_amount_multiplier_msat: 192,
680680
historical_liquidity_penalty_multiplier_msat: 10_000,
681681
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),
683683
manual_node_penalties: HashMap::new(),
684684
anti_probing_penalty_msat: 250,
685685
considered_impossible_penalty_msat: 1_0000_0000_000,
@@ -820,7 +820,7 @@ impl<L: Deref<Target = u64>, BRT: Deref<Target = HistoricalBucketRangeTracker>,
820820
// bucket.
821821
let mut total_valid_points_tracked = 0;
822822
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())
824824
.map(|decays| cmp::min(decays, u32::max_value() as u64) as u32)
825825
.unwrap_or(u32::max_value());
826826
// 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
946946

947947
fn update_history_buckets(&mut self) {
948948
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())
950950
.map(|v| v.try_into().unwrap_or(u32::max_value())).unwrap_or(u32::max_value());
951951
self.min_liquidity_offset_history.decay_data(half_lives);
952952
self.max_liquidity_offset_history.decay_data(half_lives);

0 commit comments

Comments
 (0)