From 529fd7503f3f0925eb4a68a27ba988ca533c0917 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 25 Jun 2024 15:32:21 -0700 Subject: [PATCH] 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. --- server.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server.go b/server.go index 0631f423cd..49f6fc3e39 100644 --- a/server.go +++ b/server.go @@ -547,6 +547,15 @@ func newServer(cfg *Config, listenAddrs []net.Addr, readBufferPool, cfg.Workers.Read, pool.DefaultWorkerTimeout, ) + // If the taproot overlay flag is set, but we don't have an aux funding + // controller, then we'll exit as this is incompatible. + if cfg.ProtocolOptions.TaprootOverlayChans && + implCfg.AuxFundingController.IsNone() { + + return nil, fmt.Errorf("taproot overlay flag set, but not " + + "aux controllers") + } + //nolint:lll featureMgr, err := feature.NewManager(feature.Config{ NoTLVOnion: cfg.ProtocolOptions.LegacyOnion(), @@ -560,6 +569,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr, NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(), CustomFeatures: cfg.ProtocolOptions.CustomFeatures(), NoTaprootChans: !cfg.ProtocolOptions.TaprootChans, + NoTaprootOverlay: !cfg.ProtocolOptions.TaprootOverlayChans, NoRouteBlinding: cfg.ProtocolOptions.NoRouteBlinding(), }) if err != nil {