mirror of https://github.com/waku-org/nwaku.git
fixing compilation errors in examples
This commit is contained in:
parent
0e0ba54900
commit
0d2c0a9410
|
@ -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"
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue