Add AccountsDataMeter to InvokeContext (#21813)

This commit is contained in:
Brooks Prumo
2021-12-28 05:14:48 -06:00
committed by GitHub
parent e1a0660948
commit 800472ddf5
11 changed files with 247 additions and 27 deletions

View File

@@ -105,6 +105,7 @@ enum InstructionErrorType {
ARITHMETIC_OVERFLOW = 47;
UNSUPPORTED_SYSVAR = 48;
ILLEGAL_OWNER = 49;
ACCOUNTS_DATA_BUDGET_EXCEEDED = 50;
}
message UnixTimestamp {

View File

@@ -536,6 +536,7 @@ impl TryFrom<tx_by_addr::TransactionError> for TransactionError {
47 => InstructionError::ArithmeticOverflow,
48 => InstructionError::UnsupportedSysvar,
49 => InstructionError::IllegalOwner,
50 => InstructionError::AccountsDataBudgetExceeded,
_ => return Err("Invalid InstructionError"),
};
@@ -795,6 +796,9 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
InstructionError::IllegalOwner => {
tx_by_addr::InstructionErrorType::IllegalOwner
}
InstructionError::AccountsDataBudgetExceeded => {
tx_by_addr::InstructionErrorType::AccountsDataBudgetExceeded
}
} as i32,
custom: match instruction_error {
InstructionError::Custom(custom) => {