Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 committed Feb 13, 2023
1 parent ca60eb8 commit b706e0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,21 +578,22 @@ impl Accounts {
hash_queue: &BlockhashQueue,
) -> HashMap<Pubkey, &'a Pubkey> {
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)
Expand All @@ -602,7 +603,6 @@ impl Accounts {
});
}
}
_ => {}
});
result
}
Expand Down Expand Up @@ -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,
);

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
Expand Down

0 comments on commit b706e0a

Please sign in to comment.