mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
feature+lncfg: add new CLI flag to opt into taproot chans
This commit is contained in:
@@ -35,6 +35,10 @@ type Config struct {
|
||||
// NoWumbo unsets any bits signalling support for wumbo channels.
|
||||
NoWumbo bool
|
||||
|
||||
// NoTaprootChans unsets any bits signaling support for taproot
|
||||
// channels.
|
||||
NoTaprootChans bool
|
||||
|
||||
// NoScriptEnforcementLease unsets any bits signaling support for script
|
||||
// enforced leases.
|
||||
NoScriptEnforcementLease bool
|
||||
@@ -171,6 +175,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.ShutdownAnySegwitOptional)
|
||||
raw.Unset(lnwire.ShutdownAnySegwitRequired)
|
||||
}
|
||||
if cfg.NoTaprootChans {
|
||||
raw.Unset(lnwire.SimpleTaprootChannelsOptional)
|
||||
raw.Unset(lnwire.SimpleTaprootChannelsRequired)
|
||||
}
|
||||
|
||||
for _, custom := range cfg.CustomFeatures[set] {
|
||||
if custom > set.Maximum() {
|
||||
|
@@ -22,6 +22,10 @@ type ProtocolOptions struct {
|
||||
// mini.
|
||||
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
|
||||
// channels having the anchor commitment type.
|
||||
NoAnchors bool `long:"no-anchors" description:"disable support for anchor commitments"`
|
||||
|
@@ -24,6 +24,10 @@ type ProtocolOptions struct {
|
||||
// mini.
|
||||
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.
|
||||
// TODO(halseth): transition itests to anchors instead!
|
||||
Anchors bool `long:"anchors" description:"enable support for anchor commitments"`
|
||||
|
@@ -1461,6 +1461,9 @@
|
||||
; protocol.no-any-segwit=false
|
||||
|
||||
|
||||
; Set to enable support for the experimental taproot channel type.
|
||||
; protocol.simple-taproot-chans
|
||||
|
||||
[db]
|
||||
|
||||
; 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(),
|
||||
NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(),
|
||||
CustomFeatures: cfg.ProtocolOptions.ExperimentalProtocol.CustomFeatures(),
|
||||
NoTaprootChans: !cfg.ProtocolOptions.TaprootChans,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user