Skip to content

Commit c6ab90a

Browse files
authored
fix(chat2): warn when rln relay is enabled but not compiled (#1494)
1 parent a80ebf8 commit c6ab90a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

apps/chat2/chat2.nim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ proc processInput(rfd: AsyncFD) {.async.} =
393393

394394
if conf.rlnRelayEthAccountPrivateKey == "" and conf.rlnRelayCredPath == "":
395395
raise newException(ConfigurationError,
396-
"Either rln-relay-eth-private-key or rln-relay-cred-path MUST be passed")
396+
"Either rln-relay-eth-account-private-key or rln-relay-cred-path MUST be passed")
397397

398398
if conf.relay:
399399
await node.mountRelay(conf.topics.split(" "))
@@ -565,7 +565,7 @@ proc processInput(rfd: AsyncFD) {.async.} =
565565
rlnRelayCredentialsPassword: conf.rlnRelayCredentialsPassword
566566
)
567567

568-
await node.mountRlnRelay(rlnConf,
568+
await node.mountRlnRelay(rlnConf,
569569
spamHandler=some(spamHandler),
570570
registrationHandler=some(registrationHandler))
571571

@@ -574,7 +574,10 @@ proc processInput(rfd: AsyncFD) {.async.} =
574574
echo "your rln identity nullifier is: ", node.wakuRlnRelay.identityCredential.idNullifier.inHex()
575575
echo "your rln identity secret hash is: ", node.wakuRlnRelay.identityCredential.idSecretHash.inHex()
576576
echo "your rln identity commitment key is: ", node.wakuRlnRelay.identityCredential.idCommitment.inHex()
577-
577+
else:
578+
info "WakuRLNRelay is disabled"
579+
if conf.rlnRelay:
580+
echo "WakuRLNRelay is disabled, please enable it by compiling with the RLN/EXPERIMENTAL flag"
578581
if conf.metricsLogging:
579582
startMetricsLog()
580583

0 commit comments

Comments
 (0)