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

Fix purging of cancelled invoices #37

Merged
merged 1 commit into from
Feb 24, 2023
Merged

Conversation

mutatrum
Copy link

@mutatrum mutatrum commented Feb 20, 2023

Fix a bug in purging of settled invoices on the LND REST API backend. This caused future pending invoice queries to fail because the internal administration no longer aligned with the LND pending invoices and caused the invoice watch to fail.

@mutatrum mutatrum changed the title Purge missing pending invoices Fix purging of settled invoices Feb 20, 2023
@mutatrum
Copy link
Author

This is not a sufficient fix. I'm still investigating what exactly happens.

@mutatrum
Copy link
Author

Related LND issue: lightningnetwork/lnd#6299

When gc-canceled-invoices-on-the-fly=true is set on LND, there is no CANCELED state published, the invoice is deleted as soon as it expired.

@mutatrum mutatrum changed the title Fix purging of settled invoices Fix purging of cancelled invoices Feb 20, 2023
@mutatrum
Copy link
Author

This seems to work. If the individual invoice can't be found anymore, the state is set to Cancelled and the invoice-updated event is emitted.

@Dolu89 Dolu89 merged commit ddd75c5 into blc-org:master Feb 24, 2023
@mutatrum mutatrum deleted the master branch March 1, 2023 21:34
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

Successfully merging this pull request may close these issues.

2 participants