Skip to content

Commit

Permalink
lnd: signal taproot overlay chans based on config
Browse files Browse the repository at this point in the history
We also add a sanity check to make sure they can't be signaled without
the aux interfaces.
  • Loading branch information
Roasbeef authored and guggero committed Aug 21, 2024
1 parent d0db776 commit 993c577
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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 {
Expand Down

0 comments on commit 993c577

Please sign in to comment.