Skip to content

Commit 529fd75

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 a23a9c9 commit 529fd75

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
@@ -547,6 +547,15 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
547547
readBufferPool, cfg.Workers.Read, pool.DefaultWorkerTimeout,
548548
)
549549

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

0 commit comments

Comments
 (0)