Skip to content
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

OutboundPayments::abandon_payment doesn't wait for the payment to fail to generate a PaymentFailed Event #2152

Closed
TheBlueMatt opened this issue Apr 4, 2023 · 3 comments
Milestone

Comments

@TheBlueMatt
Copy link
Collaborator

See discussion at #2142 (comment)

@TheBlueMatt TheBlueMatt added this to the 0.0.115 milestone Apr 4, 2023
@alecchendev
Copy link
Contributor

Since this is marked with the upcoming milestone if it's easier for someone else to pick this up feel free to take it from me, otherwise I'll have a PR open tomorrow!

@alecchendev
Copy link
Contributor

I noticed in OutboundPayments::abandon_payment (and in abandon_entry) it only pushes an Event::PaymentFailed if payment.get().remaining_parts() == 0 which from what I understand means there aren't any pending HTLCs. From the other places where Event::PaymentFailed is pushed (fail_htlc and check_retry_payments), it seems like this is mainly what it means for the payment to have failed (given it's either PendingOutboundPayment::Abandoned or exhausted the retry strategy) - would this mean the issue is resolved or is there something I'm missing?

(Btw I realized I mispoke in #2142 (comment) about PaymentFailed being "directly" pushed in abandon_payment)

@TheBlueMatt
Copy link
Collaborator Author

Ah! Yes, this is not a bug, then. Indeed, as long as we check the remaining_parts is 0 before pushing the event we're good. I must've missed it when I was skimming the code before opening this issue. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants