diff options
Diffstat (limited to 'src/peering/fullmesh.rs')
-rw-r--r-- | src/peering/fullmesh.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/peering/fullmesh.rs b/src/peering/fullmesh.rs index ea753e1..5f17718 100644 --- a/src/peering/fullmesh.rs +++ b/src/peering/fullmesh.rs @@ -329,7 +329,7 @@ impl FullMeshPeeringStrategy { hex::encode(id), ping_time ); - match self.ping_endpoint.call(&id, ping_msg, PRIO_HIGH).await { + match self.ping_endpoint.call(&id, &ping_msg, PRIO_HIGH).await { Err(e) => warn!("Error pinging {}: {}", hex::encode(id), e), Ok(ping_resp) => { let resp_time = Instant::now(); @@ -361,7 +361,7 @@ impl FullMeshPeeringStrategy { let pex_message = PeerListMessage { list: peer_list }; match self .peer_list_endpoint - .call(id, pex_message, PRIO_BACKGROUND) + .call(id, &pex_message, PRIO_BACKGROUND) .await { Err(e) => warn!("Error doing peer exchange: {}", e), @@ -451,7 +451,7 @@ impl FullMeshPeeringStrategy { #[async_trait] impl EndpointHandler<PingMessage> for FullMeshPeeringStrategy { - async fn handle(self: &Arc<Self>, ping: PingMessage, from: NodeID) -> PingMessage { + async fn handle(self: &Arc<Self>, ping: &PingMessage, from: NodeID) -> PingMessage { let ping_resp = PingMessage { id: ping.id, peer_list_hash: self.known_hosts.read().unwrap().hash, @@ -465,7 +465,7 @@ impl EndpointHandler<PingMessage> for FullMeshPeeringStrategy { impl EndpointHandler<PeerListMessage> for FullMeshPeeringStrategy { async fn handle( self: &Arc<Self>, - peer_list: PeerListMessage, + peer_list: &PeerListMessage, _from: NodeID, ) -> PeerListMessage { self.handle_peer_list(&peer_list.list[..]); |