From 0181347b428fd34bc6878a4d21632d73dc1ab5cc Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 10 Jul 2023 15:41:55 -0700 Subject: [PATCH] one less clone --- web3_proxy/src/rpcs/many.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web3_proxy/src/rpcs/many.rs b/web3_proxy/src/rpcs/many.rs index 39a7bd3d..ffe8c853 100644 --- a/web3_proxy/src/rpcs/many.rs +++ b/web3_proxy/src/rpcs/many.rs @@ -1164,7 +1164,7 @@ impl Web3Rpcs { only_backups_used = false; } - x.clone_connection() + rpc }), ); @@ -1201,7 +1201,7 @@ impl Web3Rpcs { tokio::select! { _ = sleep_until(max_sleep) => { // rpcs didn't change and we have waited too long. break to return an error - warn!("timeout waiting for try_send_all_synced_connections!"); + warn!(?self, "timeout waiting for try_send_all_synced_connections!"); break; }, _ = watch_consensus_rpcs.changed() => { @@ -1219,7 +1219,10 @@ impl Web3Rpcs { if let Some(max_wait) = max_wait { if start.elapsed() > max_wait { - warn!("All rate limits exceeded. And sleeping would take too long"); + warn!( + ?self, + "All rate limits exceeded. And sleeping would take too long" + ); break; } @@ -1237,7 +1240,7 @@ impl Web3Rpcs { continue; } else { - warn!("All rate limits exceeded."); + warn!(?self, "all rate limits exceeded"); break; } }