multi: add keep-failed-payment-attempts flag

This commit is contained in:
Tommy Volk committed 2022-07-03 21:04:27 +00:00
1 parent e6277986fd
commit 8291e8a170
7 files changed
+72 -34

No files matched your search

+12
View File
@@ -61,6 +61,10 @@ type Options struct {
// dryRun will fail to commit a successful migration when opening the
// database if set to true.
dryRun bool
// keepFailedPaymentAttempts determines whether failed htlc attempts
// are kept on disk or removed to save space.
keepFailedPaymentAttempts bool
}
// DefaultOptions returns an Options populated with default values.
@@ -164,3 +168,11 @@ func OptionDryRunMigration(dryRun bool) OptionModifier {
o.dryRun = dryRun
}
}
// OptionKeepFailedPaymentAttempts controls whether failed payment attempts are
// kept on disk after a payment settles.
func OptionKeepFailedPaymentAttempts(keepFailedPaymentAttempts bool) OptionModifier {
return func(o *Options) {
o.keepFailedPaymentAttempts = keepFailedPaymentAttempts
}
}