diff --git a/runtime/src/accounts.rs b/runtime/src/accounts.rs index af18d92ec273de..af083cdfa7704f 100644 --- a/runtime/src/accounts.rs +++ b/runtime/src/accounts.rs @@ -578,21 +578,22 @@ impl Accounts { hash_queue: &BlockhashQueue, ) -> HashMap { let mut result = HashMap::new(); - txs.iter().zip(lock_results).for_each(|etx| match etx { - (tx, (Ok(()), nonce)) => { - if let Some(_) = nonce + txs.iter().zip(lock_results).for_each(|etx| { + if let (tx, (Ok(()), nonce)) = etx { + if nonce .as_ref() .map(|nonce| nonce.lamports_per_signature()) .unwrap_or_else(|| { hash_queue.get_lamports_per_signature(tx.message().recent_blockhash()) }) + .is_some() { tx.message().account_keys().iter().for_each(|key| { if !result.contains_key(key) { if let Ok(index) = self.accounts_db.account_matches_owners( ancestors, - &key, - &program_owners, + key, + program_owners, ) { program_owners .get(index) @@ -602,7 +603,6 @@ impl Accounts { }); } } - _ => {} }); result } @@ -2008,8 +2008,8 @@ mod tests { let programs = accounts.filter_program_accounts( &ancestors, &[sanitized_tx1, sanitized_tx2], - &vec![(Ok(()), None), (Ok(()), None)], - &vec![&program1_pubkey, &program2_pubkey], + &[(Ok(()), None), (Ok(()), None)], + &[&program1_pubkey, &program2_pubkey], &hash_queue, ); diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index b1fe60df74ff9a..2ffba204883f40 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -106,6 +106,7 @@ use { AccountSharedData, InheritableAccountFields, ReadableAccount, WritableAccount, }, account_utils::StateMut, + bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable::{self, UpgradeableLoaderState}, clock::{ BankId, Epoch, Slot, SlotCount, SlotIndex, UnixTimestamp, DEFAULT_HASHES_PER_TICK, @@ -154,7 +155,6 @@ use { transaction_context::{ ExecutionRecord, TransactionAccount, TransactionContext, TransactionReturnData, }, - {bpf_loader, bpf_loader_deprecated}, }, solana_stake_program::stake_state::{ self, InflationPointCalculationEvent, PointValue, StakeState, @@ -4421,7 +4421,7 @@ impl Bank { let program_accounts_map = self.rc.accounts.filter_program_accounts( &self.ancestors, sanitized_txs, - &check_results, + check_results, program_owners, &self.blockhash_queue.read().unwrap(), );