server: thread through new NoRbfCoopClose option

For now, we disallow the option to be used with the taproot chans
option, as the new flow hasn't yet been updated for nonce usage.
This commit is contained in:
Olaoluwa Osuntokun 2024-03-05 00:19:19 -06:00
parent 47af913b45
commit 429bbf33ef

View File

@ -612,6 +612,17 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
"aux controllers")
}
// For now, the RBF coop close flag and the taproot channel type cannot
// be used together.
//
// TODO(roasbeef): fix
if cfg.ProtocolOptions.RbfCoopClose &&
cfg.ProtocolOptions.TaprootChans {
return nil, fmt.Errorf("RBF coop close and taproot " +
"channels cannot be used together")
}
//nolint:ll
featureMgr, err := feature.NewManager(feature.Config{
NoTLVOnion: cfg.ProtocolOptions.LegacyOnion(),
@ -629,6 +640,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
NoRouteBlinding: cfg.ProtocolOptions.NoRouteBlinding(),
NoExperimentalEndorsement: cfg.ProtocolOptions.NoExperimentalEndorsement(),
NoQuiescence: cfg.ProtocolOptions.NoQuiescence(),
NoRbfCoopClose: !cfg.ProtocolOptions.RbfCoopClose,
})
if err != nil {
return nil, err