channeldb: final htlc resolution storage opt-in
This commit is contained in:
10 files changed
+85
-27
No files matched your search
@@ -74,6 +74,10 @@ type Options struct {
|
||||
// keepFailedPaymentAttempts determines whether failed htlc attempts
|
||||
// are kept on disk or removed to save space.
|
||||
keepFailedPaymentAttempts bool
|
||||
|
||||
// storeFinalHtlcResolutions determines whether to persistently store
|
||||
// the final resolution of incoming htlcs.
|
||||
storeFinalHtlcResolutions bool
|
||||
}
|
||||
|
||||
// DefaultOptions returns an Options populated with default values.
|
||||
@@ -187,6 +191,16 @@ func OptionKeepFailedPaymentAttempts(keepFailedPaymentAttempts bool) OptionModif
|
||||
}
|
||||
}
|
||||
|
||||
// OptionStoreFinalHtlcResolutions controls whether to persistently store the
|
||||
// final resolution of incoming htlcs.
|
||||
func OptionStoreFinalHtlcResolutions(
|
||||
storeFinalHtlcResolutions bool) OptionModifier {
|
||||
|
||||
return func(o *Options) {
|
||||
o.storeFinalHtlcResolutions = storeFinalHtlcResolutions
|
||||
}
|
||||
}
|
||||
|
||||
// OptionPruneRevocationLog specifies whether the migration for pruning
|
||||
// revocation logs needs to be applied or not.
|
||||
func OptionPruneRevocationLog(prune bool) OptionModifier {
|
||||
|
||||
Reference in new issue
Block a user