mirror of https://github.com/waku-org/nwaku.git
chore(networkmonitor): add missing field on RlnRelay init, set default for num of shard (#3136)
This commit is contained in:
parent
ff21c01ebd
commit
edcb0e15f2
|
@ -614,6 +614,12 @@ when isMainModule:
|
|||
waitFor node.mountRelay()
|
||||
waitFor node.mountLibp2pPing()
|
||||
|
||||
var onFatalErrorAction = proc(msg: string) {.gcsafe, closure.} =
|
||||
## Action to be taken when an internal error occurs during the node run.
|
||||
## e.g. the connection with the database is lost and not recovered.
|
||||
error "Unrecoverable error occurred", error = msg
|
||||
quit(QuitFailure)
|
||||
|
||||
if conf.rlnRelay and conf.rlnRelayEthContractAddress != "":
|
||||
let rlnConf = WakuRlnConfig(
|
||||
rlnRelayDynamic: conf.rlnRelayDynamic,
|
||||
|
@ -624,6 +630,7 @@ when isMainModule:
|
|||
rlnRelayCredPassword: "",
|
||||
rlnRelayTreePath: conf.rlnRelayTreePath,
|
||||
rlnEpochSizeSec: conf.rlnEpochSizeSec,
|
||||
onFatalErrorAction: onFatalErrorAction,
|
||||
)
|
||||
|
||||
try:
|
||||
|
|
|
@ -45,7 +45,9 @@ type NetworkMonitorConf* = object
|
|||
.}: seq[uint16]
|
||||
|
||||
numShardsInNetwork* {.
|
||||
desc: "Number of shards in the network", name: "num-shards-in-network"
|
||||
desc: "Number of shards in the network",
|
||||
name: "num-shards-in-network",
|
||||
defaultValue: 8
|
||||
.}: uint32
|
||||
|
||||
refreshInterval* {.
|
||||
|
|
Loading…
Reference in New Issue