30
30
url:: Url ,
31
31
} ;
32
32
33
-
34
33
#[ derive( Debug , Clone ) ]
35
34
struct EndpointState {
36
35
last_failure : Option < Instant > ,
@@ -44,7 +43,6 @@ struct RoundRobinState {
44
43
cooldown_duration : Duration ,
45
44
}
46
45
47
-
48
46
impl RoundRobinState {
49
47
fn new ( endpoint_count : usize , cooldown_duration : Duration ) -> Self {
50
48
Self {
@@ -263,11 +261,10 @@ impl RpcMultiClient {
263
261
transaction : & Transaction ,
264
262
) -> anyhow:: Result < Signature > {
265
263
self . retry_with_round_robin ( "sendTransactionWithConfig" , |client| {
266
- let transaction = transaction. clone ( ) ;
267
264
Box :: pin ( async move {
268
265
client
269
266
. send_transaction_with_config (
270
- & transaction,
267
+ transaction,
271
268
RpcSendTransactionConfig {
272
269
skip_preflight : true ,
273
270
..RpcSendTransactionConfig :: default ( )
@@ -282,13 +279,12 @@ impl RpcMultiClient {
282
279
283
280
pub async fn get_signature_statuses (
284
281
& self ,
285
- signatures_contiguous : & mut [ Signature ] ,
282
+ signatures_contiguous : & [ Signature ] ,
286
283
) -> anyhow:: Result < Vec < Option < TransactionStatus > > > {
287
284
self . retry_with_round_robin ( "getSignatureStatuses" , |client| {
288
- let signatures = signatures_contiguous. to_vec ( ) ;
289
285
Box :: pin ( async move {
290
286
client
291
- . get_signature_statuses ( & signatures )
287
+ . get_signature_statuses ( signatures_contiguous )
292
288
. await
293
289
. map ( |statuses| statuses. value )
294
290
. map_err ( anyhow:: Error :: from)
@@ -302,10 +298,9 @@ impl RpcMultiClient {
302
298
price_accounts : & [ Pubkey ] ,
303
299
) -> anyhow:: Result < Vec < RpcPrioritizationFee > > {
304
300
self . retry_with_round_robin ( "getRecentPrioritizationFees" , |client| {
305
- let price_accounts = price_accounts. to_vec ( ) ;
306
301
Box :: pin ( async move {
307
302
client
308
- . get_recent_prioritization_fees ( & price_accounts)
303
+ . get_recent_prioritization_fees ( price_accounts)
309
304
. await
310
305
. map_err ( anyhow:: Error :: from)
311
306
} )
0 commit comments