8000 multi: add garbage collection to payments by Abdulkbk · Pull Request #10255 · lightningnetwork/lnd · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Abdulkbk
Copy link
Contributor

Closes #9707

This PR introduces new configs to enable garbage-collection of payments, similar to what we have for invoices. The user can start LND with --gc-failed-payments-on-startup to prune failed-payments on startup or --gc-failed-payments-on-the-fly to prune them as they fail.

The PR will be left in draft, as it's in progress, and until #9861 is completed.

We add the two configs, GcFailedPaymentsOnStartup and
GcFailedPaymentsOnTheFly that will be used to control garbage
collection of failed payments when LND starts or as soon as a
payment fails.
Here we make the controlTower struct to take in the
gcFailedPaymentsOnTheFly which is passed from the config when
creating a new server.
In this commit we check if gcFailedPaymentsOnTheFly is set to
determine if we want to delete failed payments or not.
In this commit we add DeleteFailedPayments to the ControlTower.
The methods lets us delete entire failed payments which would be
useful when we introduce garbage collection later on.
Here we add GcFailedPaymentsOnStartup to the router's config and
pass it in when creating the router in server. We also check if the
config is set so we can garbage collect failed payments on startup.
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.

[feature]: Garbage Collect Failed Payments Similar to canceled invoices
1 participant
0