Remove unwrap (#16652)
This commit is contained in:
@ -66,6 +66,7 @@ pub enum TransactionErrorType {
|
||||
InvalidProgramForExecution = 13,
|
||||
SanitizeFailure = 14,
|
||||
ClusterMaintenance = 15,
|
||||
AccountBorrowOutstanding = 16,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
|
@ -529,6 +529,7 @@ impl TryFrom<tx_by_addr::TransactionError> for TransactionError {
|
||||
13 => TransactionError::InvalidProgramForExecution,
|
||||
14 => TransactionError::SanitizeFailure,
|
||||
15 => TransactionError::ClusterMaintenance,
|
||||
16 => TransactionError::AccountBorrowOutstanding,
|
||||
_ => return Err("Invalid TransactionError"),
|
||||
})
|
||||
}
|
||||
@ -584,6 +585,9 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
|
||||
TransactionError::InstructionError(_, _) => {
|
||||
tx_by_addr::TransactionErrorType::InstructionError
|
||||
}
|
||||
TransactionError::AccountBorrowOutstanding => {
|
||||
tx_by_addr::TransactionErrorType::AccountBorrowOutstanding
|
||||
}
|
||||
} as i32,
|
||||
instruction_error: match transaction_error {
|
||||
TransactionError::InstructionError(index, ref instruction_error) => {
|
||||
|
Reference in New Issue
Block a user