check program owners (#15495)
* check program owners * BankSlotDelta should change because InstructionError variant added Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
@@ -116,4 +116,5 @@ pub enum InstructionErrorType {
|
||||
IncorrectAuthority = 43,
|
||||
BorshIoError = 44,
|
||||
AccountNotRentExempt = 45,
|
||||
InvalidAccountOwner = 46,
|
||||
}
|
||||
|
@@ -483,6 +483,9 @@ impl TryFrom<tx_by_addr::TransactionError> for TransactionError {
|
||||
41 => InstructionError::ProgramFailedToCompile,
|
||||
42 => InstructionError::Immutable,
|
||||
43 => InstructionError::IncorrectAuthority,
|
||||
44 => InstructionError::BorshIoError(String::new()),
|
||||
45 => InstructionError::AccountNotRentExempt,
|
||||
46 => InstructionError::InvalidAccountOwner,
|
||||
_ => return Err("Invalid InstructionError"),
|
||||
};
|
||||
|
||||
@@ -706,6 +709,9 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
|
||||
InstructionError::AccountNotRentExempt => {
|
||||
tx_by_addr::InstructionErrorType::AccountNotRentExempt
|
||||
}
|
||||
InstructionError::InvalidAccountOwner => {
|
||||
tx_by_addr::InstructionErrorType::InvalidAccountOwner
|
||||
}
|
||||
} as i32,
|
||||
custom: match instruction_error {
|
||||
InstructionError::Custom(custom) => {
|
||||
|
@@ -95,6 +95,7 @@ enum InstructionErrorType {
|
||||
INCORRECT_AUTHORITY = 43;
|
||||
BORSH_IO_ERROR = 44;
|
||||
ACCOUNT_NOT_RENT_EXEMPT = 45;
|
||||
INVALID_ACCOUNT_OWNER = 46;
|
||||
}
|
||||
|
||||
message UnixTimestamp {
|
||||
|
Reference in New Issue
Block a user