github.com/decred/dcrlnd@v0.7.6/lncfg/protocol.go (about) 1 package lncfg 2 3 // ProtocolOptions is a struct that we use to be able to test backwards 4 // compatibility of protocol additions, while defaulting to the latest within 5 // lnd, or to enable experimental protocol changes. 6 type ProtocolOptions struct { 7 // LegacyProtocol is a sub-config that houses all the legacy protocol 8 // options. These are mostly used for integration tests as most modern 9 // nodes shuld always run with them on by default. 10 LegacyProtocol `group:"legacy" namespace:"legacy"` 11 12 // ExperimentalProtocol is a sub-config that houses any experimental 13 // protocol features that also require a build-tag to activate. 14 ExperimentalProtocol 15 16 // WumboChans should be set if we want to enable support for wumbo 17 // (channels larger than 10.7 DCR) channels, which is the opposite of 18 // mini. 19 WumboChans bool `long:"wumbo-channels" description:"if set, then lnd will create and accept requests for channels larger chan 10.7 DCR"` 20 21 // Anchors enables anchor commitments. 22 Anchors bool `long:"anchors" description:"EXPERIMENTAL: some features of anchor channels don't work on decred's mainnet"` 23 24 // ScriptEnforcedLease should be set if we don't want to support 25 // opening or accepting channels having the script enforced commitment 26 // type for leased channel. 27 ScriptEnforcedLease bool `long:"script-enforced-lease" description:"disable support for script enforced lease commitments"` 28 } 29 30 // Wumbo returns true if lnd should permit the creation and acceptance of wumbo 31 // channels. 32 func (l *ProtocolOptions) Wumbo() bool { 33 return l.WumboChans 34 } 35 36 // NoAnchorCommitments returns true if we have disabled support for the anchor 37 // commitment type. 38 func (l *ProtocolOptions) NoAnchorCommitments() bool { 39 return !l.Anchors 40 } 41 42 // ScriptEnforcementLease returns true if we have disabled support for the 43 // script enforcement commitment type for leased channels. 44 func (l *ProtocolOptions) ScriptEnforcementLease() bool { 45 return l.ScriptEnforcedLease 46 }