Skip to content

Commit

Permalink
fix(rln-relay): should error out on rln-relay mount failure (#1904)
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Aug 16, 2023
1 parent 7869078 commit 8c568ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions waku/node/waku_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -663,17 +663,15 @@ when defined(rln):
info "mounting rln relay"

if node.wakuRelay.isNil():
error "WakuRelay protocol is not mounted, cannot mount WakuRlnRelay"
return
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,
registrationHandler)
if rlnRelayRes.isErr():
error "failed to mount WakuRlnRelay", error=rlnRelayRes.error
return
raise newException(CatchableError, "failed to mount WakuRlnRelay: {rlnRelayRes.error}")
let rlnRelay = rlnRelayRes.get()
let validator = generateRlnValidator(rlnRelay, spamHandler)
let pb = PubSub(node.wakuRelay)
Expand Down

0 comments on commit 8c568ca

Please sign in to comment.