Function assert_custom_error_or_program_error

Source
pub fn assert_custom_error_or_program_error(
    result: Result<Signature, RpcError>,
    error_code: u32,
) -> Result<(), RpcError>
Expand description

Asserts that the given BanksTransactionResultWithMetadata is an error with a custom error code or a program error. Unfortunately BanksTransactionResultWithMetadata does not reliably expose the custom error code, so we allow program error as well.