From 78ebb3af77bdeca1d62761f79ecb2c3b26c08728 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Wed, 6 Sep 2023 16:59:41 +0200 Subject: [PATCH] peer_manager_request: no need to use ptr WakuNode --- .../requests/peer_manager_request.nim | 4 ++-- .../inter_thread_communication/waku_thread_request.nim | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/library/waku_thread/inter_thread_communication/requests/peer_manager_request.nim b/library/waku_thread/inter_thread_communication/requests/peer_manager_request.nim index 550c1c867e..001964750d 100644 --- a/library/waku_thread/inter_thread_communication/requests/peer_manager_request.nim +++ b/library/waku_thread/inter_thread_communication/requests/peer_manager_request.nim @@ -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) diff --git a/library/waku_thread/inter_thread_communication/waku_thread_request.nim b/library/waku_thread/inter_thread_communication/waku_thread_request.nim index 3661ee5bcd..1f6eb8478a 100644 --- a/library/waku_thread/inter_thread_communication/waku_thread_request.nim +++ b/library/waku_thread/inter_thread_communication/waku_thread_request.nim @@ -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)