Limit number of accounts that a transaction can lock (#22201)

This commit is contained in:
Justin Starry
2022-01-04 14:25:23 +08:00
committed by GitHub
parent 8b6310b179
commit 2b5e00d36d
10 changed files with 250 additions and 113 deletions

View File

@ -331,6 +331,7 @@ pub enum DbTransactionErrorCode {
UnsupportedVersion,
InvalidWritableAccount,
WouldExceedMaxAccountDataCostLimit,
TooManyAccountLocks,
}
impl From<&TransactionError> for DbTransactionErrorCode {
@ -362,6 +363,7 @@ impl From<&TransactionError> for DbTransactionErrorCode {
TransactionError::WouldExceedMaxAccountDataCostLimit => {
Self::WouldExceedMaxAccountDataCostLimit
}
TransactionError::TooManyAccountLocks => Self::TooManyAccountLocks,
}
}
}