Skip to content

Commit

Permalink
Fix test compile fail
Browse files Browse the repository at this point in the history
  • Loading branch information
NagyZoltanPeter committed Sep 12, 2023
1 parent 8deb2d3 commit 77f88f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/wakunode_rest/test_rest_filter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type RestFilterTest = object
clientTwdServiceNode: RestClientRef


proc init(T: type RestFilterTest): T =
proc init(T: type RestFilterTest): Future[T] {.async.} =
var testSetup = RestFilterTest()
testSetup.serviceNode = testWakuNode()
testSetup.subscriberNode = testWakuNode()
Expand Down Expand Up @@ -97,7 +97,7 @@ proc shutdown(self: RestFilterTest) {.async.} =
suite "Waku v2 Rest API - Filter V2":
asyncTest "Subscribe a node to an array of topics - POST /filter/v2/subscriptions":
# Given
let restFilterTest: RestFilterTest.init()
let restFilterTest = await RestFilterTest.init()
let subPeerId = restFilterTest.subscriberNode.peerInfo.toRemotePeerInfo().peerId

# When
Expand Down Expand Up @@ -145,7 +145,7 @@ suite "Waku v2 Rest API - Filter V2":
asyncTest "Unsubscribe a node from an array of topics - DELETE /filter/v2/subscriptions":
# Given
let
restFilterTest: RestFilterTest.init()
restFilterTest = await RestFilterTest.init()
subPeerId = restFilterTest.subscriberNode.peerInfo.toRemotePeerInfo().peerId

# When
Expand Down Expand Up @@ -205,7 +205,7 @@ suite "Waku v2 Rest API - Filter V2":
asyncTest "ping subscribed node - GET /filter/v2/subscriptions/{requestId}":
# Given
let
restFilterTest: RestFilterTest.init()
restFilterTest = await RestFilterTest.init()
subPeerId = restFilterTest.subscriberNode.peerInfo.toRemotePeerInfo().peerId

# When
Expand Down Expand Up @@ -243,7 +243,7 @@ suite "Waku v2 Rest API - Filter V2":
asyncTest "push filtered message":
# Given
let
restFilterTest: RestFilterTest.init()
restFilterTest = await RestFilterTest.init()
subPeerId = restFilterTest.subscriberNode.peerInfo.toRemotePeerInfo().peerId

restFilterTest.messageCache.subscribe(DefaultPubsubTopic)
Expand Down
3 changes: 0 additions & 3 deletions waku/waku_filter_v2/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ proc sendSubscribeRequest(wfc: WakuFilterClient, servicePeer: RemotePeerInfo,
{.async.} =
trace "Sending filter subscribe request", peerId=servicePeer.peerId, filterSubscribeRequest

if filterSubscribeRequest.filterSubscribeType == SUBSCRIBE:
return err(FilterSubscribeError.badRequest("Missing push handler for subscribe"))

let connOpt = await wfc.peerManager.dialPeer(servicePeer, WakuFilterSubscribeCodec)
if connOpt.isNone():
trace "Failed to dial filter service peer", servicePeer
Expand Down

0 comments on commit 77f88f8

Please sign in to comment.