From 34d49a812001d978a7894705ab5b2b69a19afac3 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 17 Jan 2023 23:57:04 +0000 Subject: [PATCH] f much better docs --- lightning/src/routing/scoring.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 5db97afae5f..d4488bd2a30 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -796,8 +796,15 @@ impl>, L: Deref, T: Time> ProbabilisticScorerU /// Query the historical estimated minimum and maximum liquidity available for sending a /// payment over the channel with `scid` towards the given `target` node. /// - /// Returns the relative probabilities of the liquidity bounds being in each octile, - /// lower-bound first. + /// Returns two sets of 8 buckets. The first set describes the probability that the liquidity + /// lower-bound is in a given octile, the second describes the probability that the liquidity + /// upper-bound is in a given octile. Each bucket holds a `u16` representing the relative + /// probability of the bound being in the given octile. + /// + /// For example, a value of `[0, 0, 0, 0, 0, 0, 32]` indicates that we belive the probability + /// of a bound being in the top octile to be 100%, and have never (recently) seen it in any + /// other octiles. A value of `[31, 0, 0, 0, 0, 0, 0, 32]` indicates we've seen the bound being + /// both in the top and bottom octile, and roughly with similar (recent) frequency. pub fn historical_estimated_channel_liquidity_probabilities(&self, scid: u64, target: &NodeId) -> Option<([u16; 8], [u16; 8])> { let graph = self.network_graph.read_only();