rust-lightning/lightning
Jeffrey Czyz 5337f89d8b
Avoid retrying over recently failed channels
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.
2022-04-01 15:52:10 -05:00
..
src Avoid retrying over recently failed channels 2022-04-01 15:52:10 -05:00
Cargo.toml Add low_r signature grinding 2022-03-25 20:34:02 +01:00