Add a per-amount base penalty in the `ProbabilisticScorer`
authorMatt Corallo <git@bluematt.me>
Thu, 14 Jul 2022 01:06:10 +0000 (01:06 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 25 Jul 2022 19:22:24 +0000 (19:22 +0000)
commitfe39a89ab3b4a7542d68ad33505a36a1e84152d0
treecd64a65398b36e2c7837fcf8497cfbbb1e4b10d2
parent5023ff05a86aa36ff809d176bdd285ee8c699682
Add a per-amount base penalty in the `ProbabilisticScorer`

There's not much reason to not have a per-hop-per-amount penalty in
the `ProbabilisticScorer` to go along with the per-hop penalty to
let it scale up to larger amounts, so we add one here.

Notably, we use a divisor of 2^30 instead of 2^20 (like the
equivalent liquidity penalty) as it allows for more flexibility,
and there's not really any reason to worry about us not being able
to create high enough penalties.

Closes #1616
lightning/src/routing/scoring.rs