mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
fix(rln-relay): waitFor startup, otherwise valid proofs will be marked invalid (#1920)
This commit is contained in:
parent
41660d6172
commit
de0a40972b
@ -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…
x
Reference in New Issue
Block a user