use cost model to limit new account creation (#21369)
* use cost model to limit new account creation * handle every system instruction * remove & * simplify match * simplify match * add datapoint for account data size * add postgres error handling * handle accounts:unlock_accounts
This commit is contained in:
committed by
GitHub
parent
025a5a3b9c
commit
90f41fd9b7
@ -330,6 +330,7 @@ pub enum DbTransactionErrorCode {
|
||||
WouldExceedMaxBlockCostLimit,
|
||||
UnsupportedVersion,
|
||||
InvalidWritableAccount,
|
||||
WouldExceedMaxAccountDataCostLimit,
|
||||
}
|
||||
|
||||
impl From<&TransactionError> for DbTransactionErrorCode {
|
||||
@ -358,6 +359,9 @@ impl From<&TransactionError> for DbTransactionErrorCode {
|
||||
TransactionError::WouldExceedMaxBlockCostLimit => Self::WouldExceedMaxBlockCostLimit,
|
||||
TransactionError::UnsupportedVersion => Self::UnsupportedVersion,
|
||||
TransactionError::InvalidWritableAccount => Self::InvalidWritableAccount,
|
||||
TransactionError::WouldExceedMaxAccountDataCostLimit => {
|
||||
Self::WouldExceedMaxAccountDataCostLimit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user