Skip to content

Commit

Permalink
chore(networkmonitor): add missing field on RlnRelay init, set defaul…
Browse files Browse the repository at this point in the history
…t for num of shard (#3136)
  • Loading branch information
vpavlin authored Oct 23, 2024
1 parent ff21c01 commit edcb0e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions apps/networkmonitor/networkmonitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -624,6 +630,7 @@ when isMainModule:
rlnRelayCredPassword: "",
rlnRelayTreePath: conf.rlnRelayTreePath,
rlnEpochSizeSec: conf.rlnEpochSizeSec,
onFatalErrorAction: onFatalErrorAction,
)

try:
Expand Down
4 changes: 3 additions & 1 deletion apps/networkmonitor/networkmonitor_config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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* {.
Expand Down

0 comments on commit edcb0e1

Please sign in to comment.