mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-03-22 00:43:09 +00:00
Remove filter parts from relay as this is obsolete (moved to WakuNode) (#132)
This commit is contained in:
parent
2717209f05
commit
ea079cf7bd
@ -129,9 +129,6 @@ proc start*(node: WakuNode) {.async.} =
|
|||||||
let storeProto = WakuStore.init()
|
let storeProto = WakuStore.init()
|
||||||
node.switch.mount(storeProto)
|
node.switch.mount(storeProto)
|
||||||
|
|
||||||
let wakuRelay = cast[WakuRelay](node.switch.pubSub.get())
|
|
||||||
wakuRelay.addFilter("store", storeProto.filter())
|
|
||||||
|
|
||||||
# TODO Get this from WakuNode obj
|
# TODO Get this from WakuNode obj
|
||||||
let peerInfo = node.peerInfo
|
let peerInfo = node.peerInfo
|
||||||
let id = peerInfo.peerId.pretty
|
let id = peerInfo.peerId.pretty
|
||||||
|
|||||||
@ -4,13 +4,11 @@
|
|||||||
## Instead, it should likely be on top of GossipSub with a similar interface.
|
## Instead, it should likely be on top of GossipSub with a similar interface.
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[strutils, tables],
|
std/strutils,
|
||||||
chronos, chronicles, metrics,
|
chronos, chronicles, metrics,
|
||||||
libp2p/protocols/pubsub/[pubsub, pubsubpeer, floodsub, gossipsub],
|
libp2p/protocols/pubsub/[pubsub, floodsub, gossipsub],
|
||||||
libp2p/protocols/pubsub/rpc/messages,
|
libp2p/protocols/pubsub/rpc/messages,
|
||||||
libp2p/stream/connection,
|
libp2p/stream/connection
|
||||||
../../node/v2/waku_types,
|
|
||||||
./filter
|
|
||||||
|
|
||||||
declarePublicGauge total_messages, "number of messages received"
|
declarePublicGauge total_messages, "number of messages received"
|
||||||
|
|
||||||
@ -93,6 +91,3 @@ method stop*(w: WakuRelay) {.async.} =
|
|||||||
await procCall GossipSub(w).stop()
|
await procCall GossipSub(w).stop()
|
||||||
else:
|
else:
|
||||||
await procCall FloodSub(w).stop()
|
await procCall FloodSub(w).stop()
|
||||||
|
|
||||||
proc addFilter*(w: WakuRelay, name: string, filter: Filter) =
|
|
||||||
w.filters.subscribe(name, filter)
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user