Remove filter parts from relay as this is obsolete (moved to WakuNode) (#132)

This commit is contained in:
Kim De Mey 2020-09-02 16:52:00 +02:00 committed by GitHub
parent 2717209f05
commit ea079cf7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -129,9 +129,6 @@ proc start*(node: WakuNode) {.async.} =
let storeProto = WakuStore.init()
node.switch.mount(storeProto)
let wakuRelay = cast[WakuRelay](node.switch.pubSub.get())
wakuRelay.addFilter("store", storeProto.filter())
# TODO Get this from WakuNode obj
let peerInfo = node.peerInfo
let id = peerInfo.peerId.pretty

View File

@ -4,13 +4,11 @@
## Instead, it should likely be on top of GossipSub with a similar interface.
import
std/[strutils, tables],
std/strutils,
chronos, chronicles, metrics,
libp2p/protocols/pubsub/[pubsub, pubsubpeer, floodsub, gossipsub],
libp2p/protocols/pubsub/[pubsub, floodsub, gossipsub],
libp2p/protocols/pubsub/rpc/messages,
libp2p/stream/connection,
../../node/v2/waku_types,
./filter
libp2p/stream/connection
declarePublicGauge total_messages, "number of messages received"
@ -93,6 +91,3 @@ method stop*(w: WakuRelay) {.async.} =
await procCall GossipSub(w).stop()
else:
await procCall FloodSub(w).stop()
proc addFilter*(w: WakuRelay, name: string, filter: Filter) =
w.filters.subscribe(name, filter)