fix: wakuV2 mailserver cycle

This commit is contained in:
Richard Ramos 2021-09-01 18:34:51 -04:00 committed by Iuri Matias
parent eac373600e
commit f3f0987d43
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,7 @@ proc setPeers(self: NodeController, peers: seq[string]) =
proc init*(self: NodeController) =
self.isWakuV2 = self.status.settings.getWakuVersion() == 2
self.status.events.on(SignalType.Wallet.event) do(e:Args):
self.view.setLastMessage($WalletSignal(e).blockNumber)

View File

@ -71,6 +71,9 @@ proc init*(self: MailserverModel) =
"/../resources/fleets.json"
else:
"/../fleets.json"
self.wakuVersion = status_settings.getWakuVersion()
let fleetConfig = readFile(joinPath(getAppDir(), fleets))
self.fleet = newFleetModel(fleetConfig)
self.wakuVersion = status_settings.getWakuVersion()
@ -118,7 +121,7 @@ proc connect(self: MailserverModel, nodeAddr: string) =
else:
status_mailservers.update(nodeAddr)
self.nodes[nodeAddr] = MailserverStatus.Connecting
self.lastConnectionAttempt = cpuTime()
if connected: