Unlock only if lock_result was Ok (#34652)
This commit is contained in:
parent
74fde2dd64
commit
95f888ab54
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue