Avoid retrying over recently failed channels
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 31 Mar 2022 02:20:58 +0000 (21:20 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 1 Apr 2022 20:52:10 +0000 (15:52 -0500)
In ProbabilisticScorer, the channel liquidity balance is reduced
whenever a payment fails at the corresponding channel. The payment may
still be retried through the channel, however, because the liquidity
penalty is capped. Use u64::max_value instead in this situation to avoid
retrying over the same path. This effectively makes u64::max_value the
penalty for amounts exceeding the upper bound, as well.

As an edge case, avoid using u64::max_value on attempts where the amount
is equal to the effective capacity, which may be the HTLC maximum when
the channel capacity is unknown.


No differences found