Add runtime support for address table lookups (#22223)

* Add support for address table lookups in runtime

* feedback

* feedback
This commit is contained in:
Justin Starry
2022-01-07 11:59:09 +08:00
committed by GitHub
parent 08e64c88ed
commit 52d12cc802
16 changed files with 568 additions and 69 deletions

View File

@ -332,6 +332,10 @@ pub enum DbTransactionErrorCode {
InvalidWritableAccount,
WouldExceedMaxAccountDataCostLimit,
TooManyAccountLocks,
AddressLookupTableNotFound,
InvalidAddressLookupTableOwner,
InvalidAddressLookupTableData,
InvalidAddressLookupTableIndex,
}
impl From<&TransactionError> for DbTransactionErrorCode {
@ -364,6 +368,14 @@ impl From<&TransactionError> for DbTransactionErrorCode {
Self::WouldExceedMaxAccountDataCostLimit
}
TransactionError::TooManyAccountLocks => Self::TooManyAccountLocks,
TransactionError::AddressLookupTableNotFound => Self::AddressLookupTableNotFound,
TransactionError::InvalidAddressLookupTableOwner => {
Self::InvalidAddressLookupTableOwner
}
TransactionError::InvalidAddressLookupTableData => Self::InvalidAddressLookupTableData,
TransactionError::InvalidAddressLookupTableIndex => {
Self::InvalidAddressLookupTableIndex
}
}
}
}