Merge InstructionError and ProgramError

From the user's perspective, it's just an instruction error.
For program-specific errors, we still have
InstructionError::CustomError.
This commit is contained in:
Greg Fitzgerald
2019-03-18 10:05:03 -06:00
parent 607b368fe3
commit 8d032aba9d
21 changed files with 170 additions and 187 deletions

View File

@ -2,7 +2,6 @@ use solana_runtime::bank::Bank;
use solana_runtime::loader_utils::load_program;
use solana_sdk::genesis_block::GenesisBlock;
use solana_sdk::native_loader;
use solana_sdk::native_program::ProgramError;
use solana_sdk::transaction::{InstructionError, Transaction, TransactionError};
#[test]
@ -26,7 +25,7 @@ fn test_program_native_failure() {
bank.process_transaction(&tx),
Err(TransactionError::InstructionError(
0,
InstructionError::ProgramError(ProgramError::GenericError)
InstructionError::GenericError
))
);
}