feature+lncfg: add new CLI flag to opt into taproot chans
This commit is contained in:
5 files changed
+20
No files matched your search
@@ -35,6 +35,10 @@ type Config struct {
|
|||||||
// NoWumbo unsets any bits signalling support for wumbo channels.
|
// NoWumbo unsets any bits signalling support for wumbo channels.
|
||||||
NoWumbo bool
|
NoWumbo bool
|
||||||
|
|
||||||
|
// NoTaprootChans unsets any bits signaling support for taproot
|
||||||
|
// channels.
|
||||||
|
NoTaprootChans bool
|
||||||
|
|
||||||
// NoScriptEnforcementLease unsets any bits signaling support for script
|
// NoScriptEnforcementLease unsets any bits signaling support for script
|
||||||
// enforced leases.
|
// enforced leases.
|
||||||
NoScriptEnforcementLease bool
|
NoScriptEnforcementLease bool
|
||||||
@@ -171,6 +175,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
|||||||
raw.Unset(lnwire.ShutdownAnySegwitOptional)
|
raw.Unset(lnwire.ShutdownAnySegwitOptional)
|
||||||
raw.Unset(lnwire.ShutdownAnySegwitRequired)
|
raw.Unset(lnwire.ShutdownAnySegwitRequired)
|
||||||
}
|
}
|
||||||
|
if cfg.NoTaprootChans {
|
||||||
|
raw.Unset(lnwire.SimpleTaprootChannelsOptional)
|
||||||
|
raw.Unset(lnwire.SimpleTaprootChannelsRequired)
|
||||||
|
}
|
||||||
|
|
||||||
for _, custom := range cfg.CustomFeatures[set] {
|
for _, custom := range cfg.CustomFeatures[set] {
|
||||||
if custom > set.Maximum() {
|
if custom > set.Maximum() {
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ type ProtocolOptions struct {
|
|||||||
// mini.
|
// mini.
|
||||||
WumboChans bool `long:"wumbo-channels" description:"if set, then lnd will create and accept requests for channels larger chan 0.16 BTC"`
|
WumboChans bool `long:"wumbo-channels" description:"if set, then lnd will create and accept requests for channels larger chan 0.16 BTC"`
|
||||||
|
|
||||||
|
// TaprootChans should be set if we want to enable support for the
|
||||||
|
// experimental simple taproot chans commitment type.
|
||||||
|
TaprootChans bool `long:"taproot-chans" description:"if set, then lnd will create and accept requests for channels using the simple taproot commitment type"`
|
||||||
|
|
||||||
// NoAnchors should be set if we don't want to support opening or accepting
|
// NoAnchors should be set if we don't want to support opening or accepting
|
||||||
// channels having the anchor commitment type.
|
// channels having the anchor commitment type.
|
||||||
NoAnchors bool `long:"no-anchors" description:"disable support for anchor commitments"`
|
NoAnchors bool `long:"no-anchors" description:"disable support for anchor commitments"`
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ type ProtocolOptions struct {
|
|||||||
// mini.
|
// mini.
|
||||||
WumboChans bool `long:"wumbo-channels" description:"if set, then lnd will create and accept requests for channels larger chan 0.16 BTC"`
|
WumboChans bool `long:"wumbo-channels" description:"if set, then lnd will create and accept requests for channels larger chan 0.16 BTC"`
|
||||||
|
|
||||||
|
// TaprootChans should be set if we want to enable support for the
|
||||||
|
// experimental simple taproot chans commitment type.
|
||||||
|
TaprootChans bool `long:"taproot-chans" description:"if set, then lnd will create and accept requests for channels using the simple taproot commitment type"`
|
||||||
|
|
||||||
// Anchors enables anchor commitments.
|
// Anchors enables anchor commitments.
|
||||||
// TODO(halseth): transition itests to anchors instead!
|
// TODO(halseth): transition itests to anchors instead!
|
||||||
Anchors bool `long:"anchors" description:"enable support for anchor commitments"`
|
Anchors bool `long:"anchors" description:"enable support for anchor commitments"`
|
||||||
|
|||||||
@@ -1461,6 +1461,9 @@
|
|||||||
; protocol.no-any-segwit=false
|
; protocol.no-any-segwit=false
|
||||||
|
|
||||||
|
|
||||||
|
; Set to enable support for the experimental taproot channel type.
|
||||||
|
; protocol.simple-taproot-chans
|
||||||
|
|
||||||
[db]
|
[db]
|
||||||
|
|
||||||
; The selected database backend. The current default backend is "bolt". lnd
|
; The selected database backend. The current default backend is "bolt". lnd
|
||||||
|
|||||||
@@ -542,6 +542,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
NoZeroConf: !cfg.ProtocolOptions.ZeroConf(),
|
NoZeroConf: !cfg.ProtocolOptions.ZeroConf(),
|
||||||
NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(),
|
NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(),
|
||||||
CustomFeatures: cfg.ProtocolOptions.ExperimentalProtocol.CustomFeatures(),
|
CustomFeatures: cfg.ProtocolOptions.ExperimentalProtocol.CustomFeatures(),
|
||||||
|
NoTaprootChans: !cfg.ProtocolOptions.TaprootChans,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in new issue
Block a user