]> git.bitcoin.ninja Git - rust-lightning/commit
Notify scorer of failing payment path and channel
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 14 Oct 2021 18:04:39 +0000 (13:04 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 29 Oct 2021 19:24:53 +0000 (14:24 -0500)
commit7a8954e1ca318eecb4a03aa5f729d9d0ee9a904e
tree8386b2b24ba3f5e6be2e1ac2eb309bd9cdcfe21e
parent59659d3171141a4aab65d24462786578aa1aeaf1
Notify scorer of failing payment path and channel

Upon receiving a PaymentPathFailed event, the failing payment may be
retried on a different path. To avoid using the channel responsible for
the failure, a scorer should be notified of the failure before being
used to find a new route.

Add a payment_path_failed method to routing::Score and call it in
InvoicePayer's event handler. Introduce a LockableScore parameterization
to InvoicePayer so the scorer is locked only once before calling
find_route.
lightning-background-processor/src/lib.rs
lightning-invoice/src/payment.rs
lightning-invoice/src/utils.rs
lightning/src/routing/mod.rs
lightning/src/routing/router.rs
lightning/src/routing/scorer.rs