mirror of https://github.com/waku-org/nwaku.git
fix(wakunode2): move node config inside app init branch (#2423)
This commit is contained in:
parent
50308eda0d
commit
0dac9f9dd4
|
@ -66,6 +66,22 @@ when isMainModule:
|
||||||
|
|
||||||
var conf = confRes.get()
|
var conf = confRes.get()
|
||||||
|
|
||||||
|
## Logging setup
|
||||||
|
|
||||||
|
# Adhere to NO_COLOR initiative: https://no-color.org/
|
||||||
|
let color =
|
||||||
|
try:
|
||||||
|
not parseBool(os.getEnv("NO_COLOR", "false"))
|
||||||
|
except CatchableError:
|
||||||
|
true
|
||||||
|
|
||||||
|
logging.setupLogLevel(conf.logLevel)
|
||||||
|
logging.setupLogFormat(conf.logFormat, color)
|
||||||
|
|
||||||
|
case conf.cmd
|
||||||
|
of generateRlnKeystore:
|
||||||
|
doRlnKeystoreGenerator(conf)
|
||||||
|
of noCommand:
|
||||||
# The Waku Network config (cluster-id=1)
|
# The Waku Network config (cluster-id=1)
|
||||||
if conf.clusterId == 1:
|
if conf.clusterId == 1:
|
||||||
let twnClusterConf = ClusterConf.TheWakuNetworkConf()
|
let twnClusterConf = ClusterConf.TheWakuNetworkConf()
|
||||||
|
@ -85,26 +101,11 @@ when isMainModule:
|
||||||
conf.discv5BootstrapNodes =
|
conf.discv5BootstrapNodes =
|
||||||
conf.discv5BootstrapNodes & twnClusterConf.discv5BootstrapNodes
|
conf.discv5BootstrapNodes & twnClusterConf.discv5BootstrapNodes
|
||||||
|
|
||||||
## Logging setup
|
var wakunode2 = App.init(rng, conf)
|
||||||
|
|
||||||
# Adhere to NO_COLOR initiative: https://no-color.org/
|
|
||||||
let color =
|
|
||||||
try:
|
|
||||||
not parseBool(os.getEnv("NO_COLOR", "false"))
|
|
||||||
except CatchableError:
|
|
||||||
true
|
|
||||||
|
|
||||||
logging.setupLogLevel(conf.logLevel)
|
|
||||||
logging.setupLogFormat(conf.logFormat, color)
|
|
||||||
|
|
||||||
info "Running nwaku node", version = app.git_version
|
info "Running nwaku node", version = app.git_version
|
||||||
logConfig(conf)
|
logConfig(conf)
|
||||||
|
|
||||||
case conf.cmd
|
|
||||||
of generateRlnKeystore:
|
|
||||||
doRlnKeystoreGenerator(conf)
|
|
||||||
of noCommand:
|
|
||||||
var wakunode2 = App.init(rng, conf)
|
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# Node setup #
|
# Node setup #
|
||||||
|
|
Loading…
Reference in New Issue