]> git.bitcoin.ninja Git - rust-lightning/commit
Move retry-limiting to `retry_payment_with_route`
authorMatt Corallo <git@bluematt.me>
Fri, 27 Jan 2023 23:01:39 +0000 (23:01 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 1 Feb 2023 21:16:18 +0000 (21:16 +0000)
commit8af05e0172ab8176d1abe139521fda9d6efbed9a
tree06a99272260ef9150e15f7323b77abb5114e1c96
parentddde63ee12c8b10c0597c50940006d4cd53cfbc3
Move retry-limiting to `retry_payment_with_route`

The documentation for `Retry` is very clear that it counts the
number of failed paths, not discrete retries. When we added
retries internally in `ChannelManager`, we switched to counting
the number if discrete retries, even if multiple paths failed and
were replace with multiple MPP HTLCs.

Because we are now rewriting retries, we take this opportunity to
reduce the places where retries are analyzed, specifically a good
chunk of code is removed from `pay_internal`.

Because we now retry multiple failed paths with one single retry,
we keep the new behavior, updating the docs on `Retry` to describe
the new behavior.
lightning/src/ln/channelmanager.rs
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs