mirror of https://github.com/waku-org/nwaku.git
fix(rln-relay): waitFor startup, otherwise valid proofs will be marked invalid (#1920)
This commit is contained in:
parent
0ac8a7f0cd
commit
6c6302f9e1
|
@ -515,7 +515,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
|
|||
rlnRelayCredentialsPassword: conf.rlnRelayCredentialsPassword
|
||||
)
|
||||
|
||||
await node.mountRlnRelay(rlnConf,
|
||||
waitFor node.mountRlnRelay(rlnConf,
|
||||
spamHandler=some(spamHandler))
|
||||
|
||||
let membershipIndex = node.wakuRlnRelay.groupManager.membershipIndex.get()
|
||||
|
|
|
@ -408,7 +408,7 @@ proc setupProtocols(node: WakuNode,
|
|||
)
|
||||
|
||||
try:
|
||||
await node.mountRlnRelay(rlnConf)
|
||||
waitFor node.mountRlnRelay(rlnConf)
|
||||
except CatchableError:
|
||||
return err("failed to mount waku RLN relay protocol: " & getCurrentExceptionMsg())
|
||||
|
||||
|
|
|
@ -731,11 +731,8 @@ when defined(rln):
|
|||
|
||||
if node.wakuRelay.isNil():
|
||||
raise newException(CatchableError, "WakuRelay protocol is not mounted, cannot mount WakuRlnRelay")
|
||||
# TODO: check whether the pubsub topic is supported at the relay level
|
||||
# if rlnConf.rlnRelayPubsubTopic notin node.wakuRelay.defaultPubsubTopics:
|
||||
# error "The relay protocol does not support the configured pubsub topic for WakuRlnRelay"
|
||||
|
||||
let rlnRelayRes = await WakuRlnRelay.new(rlnConf,
|
||||
let rlnRelayRes = waitFor WakuRlnRelay.new(rlnConf,
|
||||
registrationHandler)
|
||||
if rlnRelayRes.isErr():
|
||||
raise newException(CatchableError, "failed to mount WakuRlnRelay: " & rlnRelayRes.error)
|
||||
|
|
Loading…
Reference in New Issue