Skip to content

Commit

Permalink
update name
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Feb 5, 2024
1 parent c5807b1 commit 6f377e4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions keepers/keeper-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> = transaction_batch
let submitted_transactions: Vec<Transaction> = transaction_batch
.iter()
.map(|batch| {
Transaction::new_signed_with_payer(
Expand All @@ -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::<Vec<_>>();
Expand All @@ -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);
}
}
Expand All @@ -269,7 +267,7 @@ async fn parallel_submit_transactions(

debug!(
"Transactions sent: {}, executed_signatures: {}",
transactions.len(),
submitted_transactions.len(),
executed_signatures.len()
);
}
Expand Down

0 comments on commit 6f377e4

Please sign in to comment.