Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rest): properly check if rln is used #2205

Merged
merged 2 commits into from
Nov 10, 2023
Merged

fix(rest): properly check if rln is used #2205

merged 2 commits into from
Nov 10, 2023

Conversation

vpavlin
Copy link
Member

@vpavlin vpavlin commented Nov 9, 2023

Description

Fixing leftover check for define(rln) from when RLN was compiled in conditionally.

Using the option to get a boolean instead

Changes

  • ...
  • ...

@@ -174,7 +174,7 @@ proc installRelayApiHandlers*(router: var RestRouter, node: WakuNode, cache: Mes
return RestApiResponse.internalServerError("Failed to publish: unknown RLN proof validation result")

# if we reach here its either a non-RLN message or a RLN message with a valid proof
debug "Publishing message", pubSubTopic=pubSubTopic, rln=defined(rln)
debug "Publishing message", pubSubTopic=pubSubTopic, rln=not node.wakuRlnRelay.isNil()
if not (waitFor node.publish(some(pubSubTopic), message).withTimeout(futTimeout)):
error "Failed to publish message to topic", pubSubTopic=pubSubTopic
return RestApiResponse.internalServerError("Failed to publish: timedout")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we fix it below as well?

debug "Publishing message", contentTopic=message.contentTopic, rln=defined(rln)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, missed that. It was also present in jsonrpc, so I fixed that too.

the defined(rln) is still used in libwaku (cc @Ivansete-status) - not touching that for this PR:)

Copy link

github-actions bot commented Nov 9, 2023

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2205

Built from 53e444c

Copy link
Contributor

@alrevuelta alrevuelta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@vpavlin vpavlin merged commit 2cb0989 into master Nov 10, 2023
9 of 10 checks passed
@vpavlin vpavlin deleted the fix/rln-false-log branch November 10, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants