Skip to content

Commit

Permalink
peer_manager_request: no need to use ptr WakuNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivansete-status committed Sep 6, 2023
1 parent 5c09a9d commit 78ebb3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ proc connectTo(node: WakuNode,
return ok()

proc process*(self: ptr PeerManagementRequest,
node: ptr WakuNode): Future[Result[string, string]] {.async.} =
node: WakuNode): Future[Result[string, string]] {.async.} =

defer: deallocShared(self)

case self.operation:

of CONNECT_TO:
let ret = node[].connectTo(self[].peerMultiAddr, self[].dialTimeout)
let ret = node.connectTo(self[].peerMultiAddr, self[].dialTimeout)
if ret.isErr():
return err(ret.error)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ proc process*(T: type InterThreadRequest,
of LIFECYCLE:
waitFor cast[ptr NodeLifecycleRequest](request[].reqContent).process(node)
of PEER_MANAGER:
waitFor cast[ptr PeerManagementRequest](request[].reqContent).process(node)
waitFor cast[ptr PeerManagementRequest](
request[].reqContent).process(node[])
of RELAY:
waitFor cast[ptr RelayRequest](request[].reqContent).process(node)

Expand Down

0 comments on commit 78ebb3a

Please sign in to comment.