Make the `ProbabilisticScorer` impossibility penalty configurable
authorMatt Corallo <git@bluematt.me>
Wed, 6 Jul 2022 21:05:54 +0000 (21:05 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 14 Jul 2022 18:37:25 +0000 (18:37 +0000)
commitec2b1ced077c879b0f51ef4fcd0b5d2d22aa570d
tree3b18fd31360237154ead7aef991043e8deff246e
parent93e645daf46f85949ae0edf60d36bf21e9fde8af
Make the `ProbabilisticScorer` impossibility penalty configurable

When we consider sending an HTLC over a given channel impossible
due to our current knowledge of the channel's liquidity, we
currently always assign a penalty of `u64::max_value()`. However,
because we now refuse to retry a payment along the same path in
the router itself, we can now make this value configurable. This
allows users to have a relatively high knowledge decay interval
without the side-effect of refusing to try the only available path
in cases where a channel is intermittently available.
lightning/src/routing/scoring.rs