lncfg: add protocol config option for script enforced lease support

This commit is contained in:
Wilmer Paulino authored and Olaoluwa Osuntokun committed 2021-10-19 18:30:12 -07:00
1 parent e590abc7be
commit 35fd985118
3 files changed
+29

No files matched your search

+12
View File
@@ -24,6 +24,12 @@ type ProtocolOptions struct {
// Anchors enables anchor commitments.
// TODO(halseth): transition itests to anchors instead!
Anchors bool `long:"anchors" description:"enable support for anchor commitments"`
// ScriptEnforcedLease enables script enforced commitments for channel
// leases.
//
// TODO: Move to experimental?
ScriptEnforcedLease bool `long:"script-enforced-lease" description:"enable support for script enforced lease commitments"`
}
// Wumbo returns true if lnd should permit the creation and acceptance of wumbo
@@ -37,3 +43,9 @@ func (l *ProtocolOptions) Wumbo() bool {
func (l *ProtocolOptions) NoAnchorCommitments() bool {
return !l.Anchors
}
// NoScriptEnforcementLease returns true if we have disabled support for the
// script enforcement commitment type for leased channels.
func (l *ProtocolOptions) NoScriptEnforcementLease() bool {
return !l.ScriptEnforcedLease
}