mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-05 15:33:08 +00:00
Fix compilation with rln defined (#680)
* Fix compilation with rln defined
This commit is contained in:
parent
a8aa1f354e
commit
0614d84f9f
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user