diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 54edbaf63..6c5778c02 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -4519,7 +4519,7 @@ impl Bank { fn check_age<'a>( &self, - txs: impl Iterator, + txs: impl Iterator + 'a)>, lock_results: &[Result<()>], max_age: usize, error_counters: &mut TransactionErrorMetrics, @@ -4531,7 +4531,7 @@ impl Bank { txs.zip(lock_results) .map(|(tx, lock_res)| match lock_res { Ok(()) => self.check_transaction_age( - tx, + tx.borrow(), max_age, &next_durable_nonce, &hash_queue, @@ -4577,7 +4577,7 @@ impl Bank { fn check_status_cache( &self, - sanitized_txs: &[SanitizedTransaction], + sanitized_txs: &[impl core::borrow::Borrow], lock_results: Vec, error_counters: &mut TransactionErrorMetrics, ) -> Vec { @@ -4586,6 +4586,7 @@ impl Bank { .iter() .zip(lock_results) .map(|(sanitized_tx, (lock_result, nonce))| { + let sanitized_tx = sanitized_tx.borrow(); if lock_result.is_ok() && self.is_transaction_already_processed(sanitized_tx, &rcache) { @@ -4640,7 +4641,7 @@ impl Bank { pub fn check_transactions( &self, - sanitized_txs: &[SanitizedTransaction], + sanitized_txs: &[impl core::borrow::Borrow], lock_results: &[Result<()>], max_age: usize, error_counters: &mut TransactionErrorMetrics,