Remove redundant is_stake check (#19185)

This commit is contained in:
Justin Starry
2021-08-11 11:38:03 -07:00
committed by GitHub
parent e91988c977
commit 446816de52

View File

@ -5099,7 +5099,6 @@ impl Bank {
.zip(loaded_transaction.accounts.iter()) .zip(loaded_transaction.accounts.iter())
.filter(|(_i, (_pubkey, account))| (Stakes::is_stake(account))) .filter(|(_i, (_pubkey, account))| (Stakes::is_stake(account)))
{ {
if Stakes::is_stake(account) {
if let Some(old_vote_account) = self.stakes.write().unwrap().store( if let Some(old_vote_account) = self.stakes.write().unwrap().store(
pubkey, pubkey,
account, account,
@ -5115,7 +5114,6 @@ impl Bank {
} }
} }
} }
}
overwritten_vote_accounts overwritten_vote_accounts
} }