Skip to content

Commit 1a554f4

Browse files
Roasbeefguggero
authored andcommitted
lnd: signal taproot overlay chans based on config
We also add a sanity check to make sure they can't be signaled without the aux interfaces.
1 parent 5def881 commit 1a554f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

server.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,15 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
545545
readBufferPool, cfg.Workers.Read, pool.DefaultWorkerTimeout,
546546
)
547547

548+
// If the taproot overlay flag is set, but we don't have an aux funding
549+
// controller, then we'll exit as this is incompatible.
550+
if cfg.ProtocolOptions.TaprootOverlayChans &&
551+
implCfg.AuxFundingController.IsNone() {
552+
553+
return nil, fmt.Errorf("taproot overlay flag set, but not " +
554+
"aux controllers")
555+
}
556+
548557
//nolint:lll
549558
featureMgr, err := feature.NewManager(feature.Config{
550559
NoTLVOnion: cfg.ProtocolOptions.LegacyOnion(),
@@ -558,6 +567,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
558567
NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(),
559568
CustomFeatures: cfg.ProtocolOptions.CustomFeatures(),
560569
NoTaprootChans: !cfg.ProtocolOptions.TaprootChans,
570+
NoTaprootOverlay: !cfg.ProtocolOptions.TaprootOverlayChans,
561571
NoRouteBlinding: cfg.ProtocolOptions.NoRouteBlinding(),
562572
})
563573
if err != nil {

0 commit comments

Comments
 (0)