From 73778af7c095692fad7f73cd2cb01f6ef58a5662 Mon Sep 17 00:00:00 2001 From: Kirill Lykov Date: Mon, 4 Nov 2024 08:04:41 +0100 Subject: [PATCH] pass CC by value in some tests --- rpc/src/rpc.rs | 4 ++-- send-transaction-service/src/transaction_client.rs | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index 2fbf66ec6988b9..215b23d8732b3f 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -6486,7 +6486,7 @@ pub mod tests { &bank_forks, None, receiver, - &connection_cache, + connection_cache, 1000, 1, exit, @@ -6760,7 +6760,7 @@ pub mod tests { &bank_forks, None, receiver, - &connection_cache, + connection_cache, 1000, 1, exit, diff --git a/send-transaction-service/src/transaction_client.rs b/send-transaction-service/src/transaction_client.rs index c38007d64ec67a..d7910b2b8609c3 100644 --- a/send-transaction-service/src/transaction_client.rs +++ b/send-transaction-service/src/transaction_client.rs @@ -64,10 +64,7 @@ where } } - fn get_tpu_addresses_with_slots<'a>( - &'a self, - leader_info: Option<&'a T>, - ) -> Vec<&'a SocketAddr> { + fn get_tpu_addresses<'a>(&'a self, leader_info: Option<&'a T>) -> Vec<&'a SocketAddr> { leader_info .map(|leader_info| { leader_info @@ -118,7 +115,7 @@ where .unwrap_or_default(); let mut leader_info_provider = self.leader_info_provider.lock().unwrap(); let leader_info = leader_info_provider.get_leader_info(); - let leader_addresses = self.get_tpu_addresses_with_slots(leader_info); + let leader_addresses = self.get_tpu_addresses(leader_info); addresses.extend(leader_addresses); for address in &addresses {