Add AccountsDataMeter to InvokeContext (#21813) (#22299)

(cherry picked from commit 800472ddf5)

Co-authored-by: Brooks Prumo <brooks@solana.com>
This commit is contained in:
mergify[bot]
2022-01-06 01:31:11 +00:00
committed by GitHub
parent b28d7050ab
commit 687cd4779e
11 changed files with 247 additions and 25 deletions

View File

@ -106,6 +106,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"),
};
@ -799,6 +800,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) => {