chore(networkmonitor): add missing field on RlnRelay init, set default for num of shard (#3136)

This commit is contained in:
Vaclav Pavlin 2024-10-23 10:23:25 +02:00 committed by GitHub
parent ff21c01ebd
commit edcb0e15f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -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:

View File

@ -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* {.