Skip to content

Commit 34d49a8

Browse files
committed
f much better docs
1 parent f52c900 commit 34d49a8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lightning/src/routing/scoring.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,15 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time> ProbabilisticScorerU
796796
/// Query the historical estimated minimum and maximum liquidity available for sending a
797797
/// payment over the channel with `scid` towards the given `target` node.
798798
///
799-
/// Returns the relative probabilities of the liquidity bounds being in each octile,
800-
/// lower-bound first.
799+
/// Returns two sets of 8 buckets. The first set describes the probability that the liquidity
800+
/// lower-bound is in a given octile, the second describes the probability that the liquidity
801+
/// upper-bound is in a given octile. Each bucket holds a `u16` representing the relative
802+
/// probability of the bound being in the given octile.
803+
///
804+
/// For example, a value of `[0, 0, 0, 0, 0, 0, 32]` indicates that we belive the probability
805+
/// of a bound being in the top octile to be 100%, and have never (recently) seen it in any
806+
/// other octiles. A value of `[31, 0, 0, 0, 0, 0, 0, 32]` indicates we've seen the bound being
807+
/// both in the top and bottom octile, and roughly with similar (recent) frequency.
801808
pub fn historical_estimated_channel_liquidity_probabilities(&self, scid: u64, target: &NodeId)
802809
-> Option<([u16; 8], [u16; 8])> {
803810
let graph = self.network_graph.read_only();

0 commit comments

Comments
 (0)