config: run taproot assets subserver by default

By default the taproot assets subserver will start in integrated mode
like the rest of subservers. An execption is if we are running in
"mainnet" where we want it disabled because it is not yet supported.

Users won't be able to start the sub-server in "mainnet" even if they
set the `--taproot-assets-mode=` flag.
This commit is contained in:
positiveblue 2023-05-10 14:17:01 -07:00 committed by Oliver Gugger
parent 219a9ccb85
commit 8e469d89d0
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -48,7 +48,7 @@ const (
defaultFaradayMode = ModeIntegrated
defaultLoopMode = ModeIntegrated
defaultPoolMode = ModeIntegrated
defaultTapMode = ModeDisable
defaultTapMode = ModeIntegrated
defaultConfigFilename = "lit.conf"
@ -358,6 +358,19 @@ func loadAndValidateConfig(interceptor signal.Interceptor) (*Config, error) {
return nil, err
}
// TODO(positiveblue): Taproot Assets do not support mainnet yet so we
// want the subserver disabled for that specific net.
// We cannot distinguish if the user manually set the flag
// `taproot-assets-mode` or we are using the default value (integrated)
// so we will disable the server in both cases.
if cfg.Network == "mainnet" {
log.Infof("LiT is running in mainnet, the taproot assets " +
"subserver do not support the `mainnet` network yet, " +
"disabling taproot assets subserver")
cfg.TaprootAssetsMode = ModeDisable
}
// Translate the more user friendly string modes into the more developer
// friendly internal bool variables now.
cfg.lndRemote = cfg.LndMode == ModeRemote