Skip to content

Commit c748709

Browse files
committed
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 0651488 commit c748709

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
@@ -543,6 +543,15 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
543543
readBufferPool, cfg.Workers.Read, pool.DefaultWorkerTimeout,
544544
)
545545

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

0 commit comments

Comments
 (0)