]> git.bitcoin.ninja Git - rust-lightning/commit
Don't retry overpaid values for `PartialFailure`s
authorElias Rohrer <dev@tnull.de>
Wed, 27 Sep 2023 10:43:31 +0000 (12:43 +0200)
committerElias Rohrer <dev@tnull.de>
Thu, 28 Sep 2023 17:45:31 +0000 (19:45 +0200)
commitbe1088ac080f05398ed009b1bee2730a4371341f
treec851ad86f4404c33fd6bb473e6853c4fd0dd68d7
parent8c99e34b9321db8ba22eb6b1836b436bbb652271
Don't retry overpaid values for `PartialFailure`s

Previously, if an overpaid path would fail immediately, we'd retry a
`PartialFailure` with the full path amount, _including_ any overpayment.

Here, we now subtract the succeeded paths' values from the
net. value to exclude the overpaid amounts on retry.
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs