2021-05-10 11:16:59 +03:00
|
|
|
// +build !rpctest
|
|
|
|
|
2020-07-09 00:26:05 +03:00
|
|
|
package lncfg
|
|
|
|
|
|
|
|
// ProtocolOptions is a struct that we use to be able to test backwards
|
|
|
|
// compatibility of protocol additions, while defaulting to the latest within
|
|
|
|
// lnd, or to enable experimental protocol changes.
|
|
|
|
type ProtocolOptions struct {
|
|
|
|
// LegacyProtocol is a sub-config that houses all the legacy protocol
|
|
|
|
// options. These are mostly used for integration tests as most modern
|
|
|
|
// nodes shuld always run with them on by default.
|
|
|
|
LegacyProtocol `group:"legacy" namespace:"legacy"`
|
|
|
|
|
|
|
|
// ExperimentalProtocol is a sub-config that houses any experimental
|
|
|
|
// protocol features that also require a build-tag to activate.
|
|
|
|
ExperimentalProtocol
|
2020-07-02 07:04:25 +03:00
|
|
|
|
|
|
|
// WumboChans should be set if we want to enable support for wumbo
|
|
|
|
// (channels larger than 0.16 BTC) channels, which is the opposite of
|
|
|
|
// mini.
|
|
|
|
WumboChans bool `long:"wumbo-channels" description:"if set, then lnd will create and accept requests for channels larger chan 0.16 BTC"`
|
2020-12-14 22:51:35 +03:00
|
|
|
|
2021-05-10 11:16:59 +03:00
|
|
|
// NoAnchors should be set if we don't want to support opening or accepting
|
|
|
|
// channels having the anchor commitment type.
|
|
|
|
NoAnchors bool `long:"no-anchors" description:"disable support for anchor commitments"`
|
2020-07-02 07:04:25 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Wumbo returns true if lnd should permit the creation and acceptance of wumbo
|
|
|
|
// channels.
|
|
|
|
func (l *ProtocolOptions) Wumbo() bool {
|
|
|
|
return l.WumboChans
|
2020-07-09 00:26:05 +03:00
|
|
|
}
|
2020-12-14 22:51:35 +03:00
|
|
|
|
|
|
|
// NoAnchorCommitments returns true if we have disabled support for the anchor
|
|
|
|
// commitment type.
|
|
|
|
func (l *ProtocolOptions) NoAnchorCommitments() bool {
|
2021-05-10 11:16:59 +03:00
|
|
|
return l.NoAnchors
|
2020-12-14 22:51:35 +03:00
|
|
|
}
|