diff --git a/accounts-db/src/accounts.rs b/accounts-db/src/accounts.rs index 8eb0702967790e..0c0058703503d0 100644 --- a/accounts-db/src/accounts.rs +++ b/accounts-db/src/accounts.rs @@ -636,18 +636,8 @@ impl Accounts { ) { let keys: Vec<_> = txs .zip(results) - .filter_map(|(tx, res)| match res { - Err(TransactionError::AccountLoadedTwice) - | Err(TransactionError::AccountInUse) - | Err(TransactionError::SanitizeFailure) - | Err(TransactionError::TooManyAccountLocks) - | Err(TransactionError::WouldExceedMaxBlockCostLimit) - | Err(TransactionError::WouldExceedMaxVoteCostLimit) - | Err(TransactionError::WouldExceedMaxAccountCostLimit) - | Err(TransactionError::WouldExceedAccountDataBlockLimit) - | Err(TransactionError::WouldExceedAccountDataTotalLimit) => None, - _ => Some(tx.get_account_locks_unchecked()), - }) + .filter(|(_, res)| res.is_ok()) + .map(|(tx, _)| tx.get_account_locks_unchecked()) .collect(); let mut account_locks = self.account_locks.lock().unwrap(); debug!("bank unlock accounts");