-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate routing errors up to send_payment_for_bolt12_invoice
#3159
Comments
I'll likely need to fix this as part of addressing #3085 (comment). Question is how should we structure the error type. Currently, we have: rust-lightning/lightning/src/ln/outbound_payment.rs Lines 506 to 518 in 6035c83
We could expand this to include a variant for |
Hmm... but that would mean we'd need to hold the lock while calling |
@jkczyz if you want, I could take this off your hands!? I can expand the |
Discussing with @TheBlueMatt offline. Doesn't seem like this is the right approach. Instead, we need to refactor the code such that:
It seems this will better align our BOLT11 and BOLT12 flows. @slanesuke Feel free to take that on if you can make it a priority. We have some other work that is blocked on it. It should be mostly straightforward, though feel free to ping me on Discord if you have any questions. Otherwise, I may need to jump on it to unblock some other work. |
Alternatively, we could probably just add another variant to |
@jkczyz thanks for the feedback! It sounds doable, I can take a stab at it and aim to open a PR by the end of the day tomorrow at the latest. If timing becomes/is an issue and it's more urgent, feel free to take care of it. Let me know, but either way works for me. |
SGTM. I can work off a hacked interface change in the interim. |
Now moved the second part to #3174 |
1.When sending a payment via the async BOLT12 flow introduced in #3078, we would log-and-swallow any path finding errors and silently abandon the payment:rust-lightning/lightning/src/ln/outbound_payment.rs
Lines 1019 to 1021 in 669a459
In order to tell the user what went wrong, it would be great to bubble up the
Err
fromfind_route_and_send_payment
rather than continuing and returningOk(())
.~~2. We should also early-abort sending in the regular
pay_for_offer
flow if we're certain we don't have sufficient liquidity (i.e. the offer amount surpasses the sum of our availablenext_outbound_htlc_limit_msat
s) ~~The text was updated successfully, but these errors were encountered: