fixing compilation errors in examples

This commit is contained in:
Gabriel mermelstein 2024-04-08 09:29:54 +03:00
parent 0e0ba54900
commit 0d2c0a9410
No known key found for this signature in database
GPG Key ID: 82B8134785FEAE0D
2 changed files with 6 additions and 4 deletions

View File

@ -45,6 +45,7 @@ import
../../waku/node/peer_manager,
../../waku/factory/builder,
../../waku/common/utils/nat,
../../waku/waku_relay,
./config_chat2
import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub
@ -522,7 +523,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
if msg.contentTopic == chat.contentTopic:
chat.printReceivedMessage(msg)
node.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic), some(handler))
node.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic), some(WakuRelayHandler(handler)))
if conf.rlnRelay:
info "WakuRLNRelay is enabled"

View File

@ -1,5 +1,5 @@
import
std/[tables, sequtils, options],
std/[tables, sequtils],
stew/byteutils,
stew/shims/net,
chronicles,
@ -16,7 +16,8 @@ import
../../../waku/waku_node,
../../../waku/waku_enr,
../../../waku/waku_discv5,
../../../waku/factory/builder
../../../waku/factory/builder,
../../../waku/waku_relay
# An accesible bootstrap node. See waku.sandbox fleets.status.im
const bootstrapNode =
@ -115,7 +116,7 @@ proc setupAndSubscribe(rng: ref HmacDrbgContext) {.async.} =
contentTopic = msg.contentTopic,
timestamp = msg.timestamp
node.subscribe((kind: PubsubSub, topic: pubsubTopic), some(handler))
node.subscribe((kind: PubsubSub, topic: pubsubTopic), some(WakuRelayHandler(handler)))
when isMainModule:
let rng = crypto.newRng()