Skip to content

Commit

Permalink
Clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
SionoiS committed Sep 15, 2023
1 parent 4420b45 commit bd83280
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/chat2/chat2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
if msg.contentTopic == chat.contentTopic:
chat.printReceivedMessage(msg)

await node.subscribe(some(DefaultPubsubTopic), @[ContentTopic("")], handler)
node.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic), some(handler))

if conf.rlnRelay:
info "WakuRLNRelay is enabled"
Expand Down
1 change: 1 addition & 0 deletions apps/wakunode2/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import
../../waku/node/rest/debug/handlers as rest_debug_api,
../../waku/node/rest/relay/handlers as rest_relay_api,
../../waku/node/rest/filter/handlers as rest_filter_api,
../../waku/node/rest/filter/legacy_handlers as rest_legacy_filter_api,
../../waku/node/rest/store/handlers as rest_store_api,
../../waku/node/rest/health/handlers as rest_health_api,
../../waku/node/jsonrpc/admin/handlers as rpc_admin_api,
Expand Down
5 changes: 2 additions & 3 deletions tests/wakunode_rest/test_rest_filter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import
../../waku/waku_relay,
../../waku/waku_filter_v2/subscriptions,
../../waku/waku_filter_v2/common,
../../waku/node/rest/relay/topic_cache,
../../waku/node/rest/relay/handlers as relay_api,
../../waku/node/rest/relay/client as relay_api_client,
../testlib/wakucore,
Expand Down Expand Up @@ -74,7 +73,7 @@ proc init(T: type RestFilterTest): Future[T] {.async.} =
testSetup.messageCache = filter_api.MessageCache.init()
installFilterRestApiHandlers(testSetup.restServer.router, testSetup.subscriberNode, testSetup.messageCache)

let topicCache = TopicCache.init()
let topicCache = MessageCache[string].init()
installRelayApiHandlers(testSetup.restServerForService.router, testSetup.serviceNode, topicCache)

testSetup.restServer.start()
Expand Down Expand Up @@ -244,7 +243,7 @@ suite "Waku v2 Rest API - Filter V2":
subPeerId = restFilterTest.subscriberNode.peerInfo.toRemotePeerInfo().peerId

restFilterTest.messageCache.subscribe(DefaultPubsubTopic)
restFilterTest.serviceNode.subscribe(DefaultPubsubTopic)
restFilterTest.serviceNode.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic))

# When
var requestBody = FilterSubscribeRequest(requestId: "1234",
Expand Down
3 changes: 1 addition & 2 deletions waku/node/waku_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ import
../waku_rln_relay,
./config,
./peer_manager,
./waku_switch,
./rest/relay/topic_cache
./waku_switch


declarePublicCounter waku_node_messages, "number of messages received", ["type"]
Expand Down

0 comments on commit bd83280

Please sign in to comment.