Cleanup unsupported sysvars (#16390)

* Cleanup unsupported sysvars

* fix ser description
This commit is contained in:
Jack May
2021-04-06 00:08:03 -07:00
committed by GitHub
parent 03d3ae1cb9
commit 92f4018b07
12 changed files with 90 additions and 39 deletions

View File

@@ -118,4 +118,5 @@ pub enum InstructionErrorType {
AccountNotRentExempt = 45,
InvalidAccountOwner = 46,
ArithmeticOverflow = 47,
UnsupportedSysvar = 48,
}

View File

@@ -510,6 +510,7 @@ impl TryFrom<tx_by_addr::TransactionError> for TransactionError {
45 => InstructionError::AccountNotRentExempt,
46 => InstructionError::InvalidAccountOwner,
47 => InstructionError::ArithmeticOverflow,
48 => InstructionError::UnsupportedSysvar,
_ => return Err("Invalid InstructionError"),
};
@@ -739,6 +740,9 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
InstructionError::ArithmeticOverflow => {
tx_by_addr::InstructionErrorType::ArithmeticOverflow
}
InstructionError::UnsupportedSysvar => {
tx_by_addr::InstructionErrorType::UnsupportedSysvar
}
} as i32,
custom: match instruction_error {
InstructionError::Custom(custom) => {