Skip to content

Commit 8e469d8

Browse files
positiveblueguggero
authored andcommitted
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.
1 parent 219a9cc commit 8e469d8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

config.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const (
4848
defaultFaradayMode = ModeIntegrated
4949
defaultLoopMode = ModeIntegrated
5050
defaultPoolMode = ModeIntegrated
51-
defaultTapMode = ModeDisable
51+
defaultTapMode = ModeIntegrated
5252

5353
defaultConfigFilename = "lit.conf"
5454

@@ -358,6 +358,19 @@ func loadAndValidateConfig(interceptor signal.Interceptor) (*Config, error) {
358358
return nil, err
359359
}
360360

361+
// TODO(positiveblue): Taproot Assets do not support mainnet yet so we
362+
// want the subserver disabled for that specific net.
363+
// We cannot distinguish if the user manually set the flag
364+
// `taproot-assets-mode` or we are using the default value (integrated)
365+
// so we will disable the server in both cases.
366+
if cfg.Network == "mainnet" {
367+
log.Infof("LiT is running in mainnet, the taproot assets " +
368+
"subserver do not support the `mainnet` network yet, " +
369+
"disabling taproot assets subserver")
370+
371+
cfg.TaprootAssetsMode = ModeDisable
372+
}
373+
361374
// Translate the more user friendly string modes into the more developer
362375
// friendly internal bool variables now.
363376
cfg.lndRemote = cfg.LndMode == ModeRemote

0 commit comments

Comments
 (0)