3030 url:: Url ,
3131} ;
3232
33-
3433#[ derive( Debug , Clone ) ]
3534struct EndpointState {
3635 last_failure : Option < Instant > ,
@@ -44,7 +43,6 @@ struct RoundRobinState {
4443 cooldown_duration : Duration ,
4544}
4645
47-
4846impl RoundRobinState {
4947 fn new ( endpoint_count : usize , cooldown_duration : Duration ) -> Self {
5048 Self {
@@ -263,11 +261,10 @@ impl RpcMultiClient {
263261 transaction : & Transaction ,
264262 ) -> anyhow:: Result < Signature > {
265263 self . retry_with_round_robin ( "sendTransactionWithConfig" , |client| {
266- let transaction = transaction. clone ( ) ;
267264 Box :: pin ( async move {
268265 client
269266 . send_transaction_with_config (
270- & transaction,
267+ transaction,
271268 RpcSendTransactionConfig {
272269 skip_preflight : true ,
273270 ..RpcSendTransactionConfig :: default ( )
@@ -282,13 +279,12 @@ impl RpcMultiClient {
282279
283280 pub async fn get_signature_statuses (
284281 & self ,
285- signatures_contiguous : & mut [ Signature ] ,
282+ signatures_contiguous : & [ Signature ] ,
286283 ) -> anyhow:: Result < Vec < Option < TransactionStatus > > > {
287284 self . retry_with_round_robin ( "getSignatureStatuses" , |client| {
288- let signatures = signatures_contiguous. to_vec ( ) ;
289285 Box :: pin ( async move {
290286 client
291- . get_signature_statuses ( & signatures )
287+ . get_signature_statuses ( signatures_contiguous )
292288 . await
293289 . map ( |statuses| statuses. value )
294290 . map_err ( anyhow:: Error :: from)
@@ -302,10 +298,9 @@ impl RpcMultiClient {
302298 price_accounts : & [ Pubkey ] ,
303299 ) -> anyhow:: Result < Vec < RpcPrioritizationFee > > {
304300 self . retry_with_round_robin ( "getRecentPrioritizationFees" , |client| {
305- let price_accounts = price_accounts. to_vec ( ) ;
306301 Box :: pin ( async move {
307302 client
308- . get_recent_prioritization_fees ( & price_accounts)
303+ . get_recent_prioritization_fees ( price_accounts)
309304 . await
310305 . map_err ( anyhow:: Error :: from)
311306 } )
0 commit comments