From 6f377e43c581c6a0c19a0a97ae67e22621e743c2 Mon Sep 17 00:00:00 2001 From: Evan Batsell Date: Mon, 5 Feb 2024 12:17:12 -0500 Subject: [PATCH] update name --- keepers/keeper-core/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/keepers/keeper-core/src/lib.rs b/keepers/keeper-core/src/lib.rs index d1b46eaa..826ed2e7 100644 --- a/keepers/keeper-core/src/lib.rs +++ b/keepers/keeper-core/src/lib.rs @@ -224,7 +224,7 @@ async fn parallel_submit_transactions( ) })?; // Convert instructions to transactions in batches and send them all, saving their signatures - let transactions: Vec = transaction_batch + let submitted_transactions: Vec = transaction_batch .iter() .map(|batch| { Transaction::new_signed_with_payer( @@ -236,7 +236,7 @@ async fn parallel_submit_transactions( }) .collect(); - let tx_futures = transactions + let tx_futures = submitted_transactions .iter() .map(|tx| async move { client.send_transaction(tx).await }) .collect::>(); @@ -251,15 +251,13 @@ async fn parallel_submit_transactions( match e.get_transaction_error() { // If blockhash not found, transaction is still valid and should not be dropped Some(TransactionError::BlockhashNotFound) => { - executed_signatures.insert( - transactions[i + index_offset].signatures[0], - i + index_offset, - ); + executed_signatures + .insert(submitted_transactions[i].signatures[0], i + index_offset); } // If another error is returned, transaction probably won't succeed on retries Some(_) | None => { let message = e.to_string(); - warn!("Transaction failed: {}", message); + warn!("Transaction failed: {:?}", e); error_messages.insert(i + index_offset, message); } } @@ -269,7 +267,7 @@ async fn parallel_submit_transactions( debug!( "Transactions sent: {}, executed_signatures: {}", - transactions.len(), + submitted_transactions.len(), executed_signatures.len() ); }