-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[feature]: Garbage Collect Failed Payments Similar to canceled invoices #9707
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
Comments
hello community .....i'm a beginner in this repo yet i'm trying to think abt the approaches or the things we could do here ... Two main cleanup scenarios could be
the way invoice GC is implemented in the repo is Configuration Options: Cleanup Triggers: only deletes canceled invoices and maintains or preserves non-canceled invoices.... Deletes from multiple indexes (invoice index, payment address index, add index) |
hey..@ziggie1984 ...i've worked out a simple approach for this now .. "Startup Garbage" Collection: Cleans up all failed payments when LND starts Database Scanning: i'm using a two-phase approach when scanning the database to avoid cursor invalidation issues: First, it will collect all payment hashes that meet the deletion criteria
configuration Integration: i will be integrating the new options with LND's existing configuration system, making them available via: Command-line flags the idea is implementing two core garbage collection functions in the channeldb package:
We will also need to modifiy the payment lifecycle to support on-the-fly garbage collection: one safetyguard is Only payments with a definitive "StatusFailed" are eligible for garbage collection, no in-flights.. |
Currently failed payments can only be deleted when actively triggered by the user via the
deletepayments
rpc. We should provide a config setting which let's the user automatically garbage-collect the payments similar to how its done with invoices:The text was updated successfully, but these errors were encountered: