]> git.bitcoin.ninja Git - rust-lightning/commit
Refactor send_payment_for_bolt12_invoice
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 11 Jul 2024 22:07:53 +0000 (17:07 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 19 Jul 2024 13:47:44 +0000 (08:47 -0500)
commit23a1eee6ece9b6af96aca74a9cadf918a0730b4f
tree843f5c46903ea2ce5b5f1a122470146a2defa49a
parentc8fd681d4f269f0fd3f683de8c5b1f9842a6600a
Refactor send_payment_for_bolt12_invoice

The BOLT11 and BOLT12 outbound payment initiation code differ in that
the latter re-uses the retry path (i.e., find_route_and_send_payment).
The drawback of this is that Ok is returned even if there is an error
finding a route. Refactor send_payment_for_bolt12_invoice such that it
re-uses find_initial_route instead so that errors can be returned.
lightning/src/ln/outbound_payment.rs