Skip to content

Commit 7817e53

Browse files
committed
f - WIP part 2
1 parent ccfe7aa commit 7817e53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/routing/scoring.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ impl<T: Time> ChannelLiquidity<T> {
677677
const NEGATIVE_LOG10_UPPER_BOUND: u64 = 2;
678678

679679
/// The divisor used when computing the amount penalty.
680-
const AMOUNT_PENALTY_DIVISOR: u64 = 1024;
680+
const AMOUNT_PENALTY_DIVISOR: u64 = 1 << 20;
681681

682682
impl<L: Deref<Target = u64>, T: Time, U: Deref<Target = T>> DirectedChannelLiquidity<L, T, U> {
683683
/// Returns a penalty for routing the given HTLC `amount_msat` through the channel in this
@@ -2125,11 +2125,11 @@ mod tests {
21252125

21262126
let params = ProbabilisticScoringParameters {
21272127
liquidity_penalty_multiplier_msat: 1_000,
2128-
amount_penalty_multiplier_msat: 1_000,
2128+
amount_penalty_multiplier_msat: 256,
21292129
..Default::default()
21302130
};
21312131
let scorer = ProbabilisticScorer::new(params, &network_graph);
2132-
assert_eq!(scorer.channel_penalty_msat(42, 512_000, 1_024_000, &source, &target), 151_190);
2132+
assert_eq!(scorer.channel_penalty_msat(42, 512_000, 1_024_000, &source, &target), 837);
21332133
}
21342134

21352135
#[test]

0 commit comments

Comments
 (0)