Add missing break when scoring a path with a missing channel 2022-10-removed-no-score-after
authorMatt Corallo <git@bluematt.me>
Mon, 31 Oct 2022 03:23:02 +0000 (03:23 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 2 Nov 2022 20:09:32 +0000 (20:09 +0000)
commit00607a5286751edd10c86f9fe6ce0d656d1e3ece
tree05b0deae266104ccbb53ffc8926af154c5289e14
parent6ca49948c169a297144d5d1474a2cef3827237e1
Add missing break when scoring a path with a missing channel

If we send payments over a path where a channel ended up being
closed, we'll remove it before we call
`ProbabilisticPaymentScorer::payment_path_failed`. This should be
fine, except that `payment_path_failed` does not break out of its
scoring loop if a channel is missing, causing it to assign a
minimum available-liquidity of the payment amount even to channels
which our attempt never arrived at.

The fix is simple - add the missing check and break.
lightning/src/routing/scoring.rs