Fix compilation with `rln` defined (#680)

* Fix compilation with rln defined
This commit is contained in:
Hanno Cornelius 2021-07-21 11:37:10 +02:00 committed by GitHub
parent 52b99f37af
commit d44eab7cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -31,7 +31,10 @@ export
waku_rln_relay_types
when defined(rln):
import ../protocol/waku_rln_relay/[rln, waku_rln_relay_utils]
import
libp2p/protocols/pubsub/rpc/messages,
web3,
../protocol/waku_rln_relay/[rln, waku_rln_relay_utils]
declarePublicCounter waku_node_messages, "number of messages received", ["type"]
declarePublicGauge waku_node_filters, "number of content filter subscriptions"
@ -462,6 +465,7 @@ when defined(rln):
node.wakuRlnRelay = rlnPeer
when defined(rln):
proc addRLNRelayValidator*(node: WakuNode, pubsubTopic: string) =
## this procedure is a thin wrapper for the pubsub addValidator method
## it sets message validator on the given pubsubTopic, the validator will check that

View File

@ -15,7 +15,9 @@ contract(MembershipContract):
# TODO define a return type of bool for register method to signify a successful registration
proc register(pubkey: Uint256) # external payable
proc createRLNInstance*(d: int, ctxPtr: var ptr RLN[Bn256]): bool =
proc createRLNInstance*(d: int, ctxPtr: var ptr RLN[Bn256]): bool
{.raises: [Defect, IOError].} =
## generates an instance of RLN
## An RLN instance supports both zkSNARKs logics and Merkle tree data structure and operations
## d indicates the depth of Merkle tree