Refactoring internal bank method signature for consistency (#34936)
This commit is contained in:
parent
62e7ebd0cc
commit
5b59930782
|
@ -4431,9 +4431,9 @@ impl Bank {
|
|||
self.rc.accounts.accounts_db.set_shrink_paths(paths);
|
||||
}
|
||||
|
||||
fn check_age<'a>(
|
||||
fn check_age(
|
||||
&self,
|
||||
txs: impl Iterator<Item = &'a (impl core::borrow::Borrow<SanitizedTransaction> + 'a)>,
|
||||
sanitized_txs: &[impl core::borrow::Borrow<SanitizedTransaction>],
|
||||
lock_results: &[Result<()>],
|
||||
max_age: usize,
|
||||
error_counters: &mut TransactionErrorMetrics,
|
||||
|
@ -4442,7 +4442,9 @@ impl Bank {
|
|||
let last_blockhash = hash_queue.last_hash();
|
||||
let next_durable_nonce = DurableNonce::from_blockhash(&last_blockhash);
|
||||
|
||||
txs.zip(lock_results)
|
||||
sanitized_txs
|
||||
.iter()
|
||||
.zip(lock_results)
|
||||
.map(|(tx, lock_res)| match lock_res {
|
||||
Ok(()) => self.check_transaction_age(
|
||||
tx.borrow(),
|
||||
|
@ -4560,9 +4562,8 @@ impl Bank {
|
|||
max_age: usize,
|
||||
error_counters: &mut TransactionErrorMetrics,
|
||||
) -> Vec<TransactionCheckResult> {
|
||||
let age_results =
|
||||
self.check_age(sanitized_txs.iter(), lock_results, max_age, error_counters);
|
||||
self.check_status_cache(sanitized_txs, age_results, error_counters)
|
||||
let lock_results = self.check_age(sanitized_txs, lock_results, max_age, error_counters);
|
||||
self.check_status_cache(sanitized_txs, lock_results, error_counters)
|
||||
}
|
||||
|
||||
pub fn collect_balances(&self, batch: &TransactionBatch) -> TransactionBalances {
|
||||
|
|
Loading…
Reference in New Issue