Wrap all client errors with TransportError

This commit is contained in:
Greg Fitzgerald
2019-04-03 21:40:29 -06:00
parent 167f5bdc58
commit 1598a02a7a
11 changed files with 136 additions and 113 deletions

View File

@ -20,10 +20,10 @@ fn test_program_native_failure() {
// Call user program
let instruction = create_invoke_instruction(alice_keypair.pubkey(), program_id, &1u8);
assert_eq!(
bank_client.send_instruction(&alice_keypair, instruction),
Err(TransactionError::InstructionError(
0,
InstructionError::GenericError
))
bank_client
.send_instruction(&alice_keypair, instruction)
.unwrap_err()
.unwrap(),
TransactionError::InstructionError(0, InstructionError::GenericError)
);
}