Skip to content

Commit

Permalink
fix: peer exchange libwaku response handling (#3141)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer authored Oct 24, 2024
1 parent a386880 commit 7660642
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ proc updateDiscv5BootstrapNodes(nodes: string, waku: ptr Waku): Result[void, str
proc performPeerExchangeRequestTo(
numPeers: uint64, waku: ptr Waku
): Future[Result[int, string]] {.async.} =
return (await waku.node.fetchPeerExchangePeers(numPeers)).isOkOr:
let numPeersRecv = (await waku.node.fetchPeerExchangePeers(numPeers)).valueOr:
return err($error)
return ok(numPeersRecv)

proc process*(
self: ptr DiscoveryRequest, waku: ptr Waku
Expand Down

0 comments on commit 7660642

Please sign in to comment.