Skip to content

Commit b9d946d

Browse files
committed
f more details, a bit more accurate description
1 parent 34d49a8 commit b9d946d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lightning/src/routing/scoring.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,16 @@ 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 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.
799+
/// Returns two sets of 8 buckets. The first set describes the octiles in which we've seen our
800+
/// lower-bound liquidity estimates, the second set describes the octiles in which we've seen
801+
/// our upper-bound liquidity estimates. Each bucket describes the relative frequency at which
802+
/// we've seen a liquidity bound in the octile relative to the channel's total capacity, on an
803+
/// arbitrary scale. Because the values are slowly decayed, more recent data points count for
804+
/// more than older datapoints.
805+
///
806+
/// When scoring, the estimated probability that an upper-/lower-bound lies in a given octile
807+
/// relative to the channel's total capacity is calculated by dividing that bucket's value with
808+
/// the total of all buckets for the given bound.
803809
///
804810
/// For example, a value of `[0, 0, 0, 0, 0, 0, 32]` indicates that we belive the probability
805811
/// of a bound being in the top octile to be 100%, and have never (recently) seen it in any

0 commit comments

Comments
 (0)