@@ -673,7 +673,7 @@ struct ChannelLiquidity<T: Time> {
673673struct DirectedChannelLiquidity < L : Deref < Target = u64 > , BRT : Deref < Target = HistoricalBucketRangeTracker > , T : Time , U : Deref < Target = T > > {
674674 min_liquidity_offset_msat : L ,
675675 max_liquidity_offset_msat : L ,
676- liquidity_offset_history : HistoricalMinMaxBuckets < BRT > ,
676+ liquidity_history : HistoricalMinMaxBuckets < BRT > ,
677677 inflight_htlc_msat : u64 ,
678678 capacity_msat : u64 ,
679679 last_updated : U ,
@@ -714,7 +714,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time> ProbabilisticScorerU
714714 let amt = directed_info. effective_capacity ( ) . as_msat ( ) ;
715715 let dir_liq = liq. as_directed ( source, target, 0 , amt, self . decay_params ) ;
716716
717- let ( min_buckets, max_buckets, _) = dir_liq. liquidity_offset_history
717+ let ( min_buckets, max_buckets, _) = dir_liq. liquidity_history
718718 . get_decayed_buckets ( now, * dir_liq. last_updated ,
719719 self . decay_params . historical_no_updates_half_life ) ;
720720
@@ -793,7 +793,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time> ProbabilisticScorerU
793793 let amt = directed_info. effective_capacity ( ) . as_msat ( ) ;
794794 let dir_liq = liq. as_directed ( source, target, 0 , amt, self . decay_params ) ;
795795
796- let ( min_buckets, mut max_buckets, _) = dir_liq. liquidity_offset_history
796+ let ( min_buckets, mut max_buckets, _) = dir_liq. liquidity_history
797797 . get_decayed_buckets ( dir_liq. now , * dir_liq. last_updated ,
798798 self . decay_params . historical_no_updates_half_life ) ;
799799 // Note that the liquidity buckets are an offset from the edge, so we inverse
@@ -824,7 +824,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time> ProbabilisticScorerU
824824 let capacity_msat = directed_info. effective_capacity ( ) . as_msat ( ) ;
825825 let dir_liq = liq. as_directed ( source, target, 0 , capacity_msat, self . decay_params ) ;
826826
827- return dir_liq. liquidity_offset_history . calculate_success_probability_times_billion (
827+ return dir_liq. liquidity_history . calculate_success_probability_times_billion (
828828 dir_liq. now , * dir_liq. last_updated ,
829829 self . decay_params . historical_no_updates_half_life , amount_msat, capacity_msat
830830 ) . map ( |p| p as f64 / ( 1024 * 1024 * 1024 ) as f64 ) ;
@@ -864,7 +864,7 @@ impl<T: Time> ChannelLiquidity<T> {
864864 DirectedChannelLiquidity {
865865 min_liquidity_offset_msat,
866866 max_liquidity_offset_msat,
867- liquidity_offset_history : HistoricalMinMaxBuckets {
867+ liquidity_history : HistoricalMinMaxBuckets {
868868 min_liquidity_offset_history,
869869 max_liquidity_offset_history,
870870 } ,
@@ -893,7 +893,7 @@ impl<T: Time> ChannelLiquidity<T> {
893893 DirectedChannelLiquidity {
894894 min_liquidity_offset_msat,
895895 max_liquidity_offset_msat,
896- liquidity_offset_history : HistoricalMinMaxBuckets {
896+ liquidity_history : HistoricalMinMaxBuckets {
897897 min_liquidity_offset_history,
898898 max_liquidity_offset_history,
899899 } ,
@@ -965,7 +965,7 @@ impl<L: Deref<Target = u64>, BRT: Deref<Target = HistoricalBucketRangeTracker>,
965965
966966 if score_params. historical_liquidity_penalty_multiplier_msat != 0 ||
967967 score_params. historical_liquidity_penalty_amount_multiplier_msat != 0 {
968- if let Some ( cumulative_success_prob_times_billion) = self . liquidity_offset_history
968+ if let Some ( cumulative_success_prob_times_billion) = self . liquidity_history
969969 . calculate_success_probability_times_billion ( self . now , * self . last_updated ,
970970 self . decay_params . historical_no_updates_half_life , amount_msat, self . capacity_msat )
971971 {
@@ -1075,15 +1075,15 @@ impl<L: DerefMut<Target = u64>, BRT: DerefMut<Target = HistoricalBucketRangeTrac
10751075 let half_lives = self . now . duration_since ( * self . last_updated ) . as_secs ( )
10761076 . checked_div ( self . decay_params . historical_no_updates_half_life . as_secs ( ) )
10771077 . map ( |v| v. try_into ( ) . unwrap_or ( u32:: max_value ( ) ) ) . unwrap_or ( u32:: max_value ( ) ) ;
1078- self . liquidity_offset_history . min_liquidity_offset_history . time_decay_data ( half_lives) ;
1079- self . liquidity_offset_history . max_liquidity_offset_history . time_decay_data ( half_lives) ;
1078+ self . liquidity_history . min_liquidity_offset_history . time_decay_data ( half_lives) ;
1079+ self . liquidity_history . max_liquidity_offset_history . time_decay_data ( half_lives) ;
10801080
10811081 let min_liquidity_offset_msat = self . decayed_offset_msat ( * self . min_liquidity_offset_msat ) ;
1082- self . liquidity_offset_history . min_liquidity_offset_history . track_datapoint (
1082+ self . liquidity_history . min_liquidity_offset_history . track_datapoint (
10831083 min_liquidity_offset_msat, self . capacity_msat
10841084 ) ;
10851085 let max_liquidity_offset_msat = self . decayed_offset_msat ( * self . max_liquidity_offset_msat ) ;
1086- self . liquidity_offset_history . max_liquidity_offset_history . track_datapoint (
1086+ self . liquidity_history . max_liquidity_offset_history . track_datapoint (
10871087 max_liquidity_offset_msat, self . capacity_msat
10881088 ) ;
10891089 }
0 commit comments