Add Program loader/environment instruction errors (#14120)

This commit is contained in:
Jack May
2020-12-15 09:54:07 -08:00
committed by GitHub
parent 03fc031611
commit d513b0c4ca
4 changed files with 31 additions and 30 deletions

View File

@@ -890,7 +890,7 @@ fn test_program_bpf_invoke() {
assert_eq!(invoked_programs, vec![]);
assert_eq!(
result.unwrap_err(),
TransactionError::InstructionError(0, InstructionError::Custom(194969602))
TransactionError::InstructionError(0, InstructionError::ProgramFailedToComplete)
);
// Check final state
@@ -1033,7 +1033,7 @@ fn test_program_bpf_ro_modify() {
let result = bank_client.send_and_confirm_message(&[&mint_keypair, &test_keypair], message);
assert_eq!(
result.unwrap_err().unwrap(),
TransactionError::InstructionError(0, InstructionError::Custom(0xb9f0002))
TransactionError::InstructionError(0, InstructionError::ProgramFailedToComplete)
);
let instruction = Instruction::new(program_pubkey, &[3_u8], account_metas.clone());
@@ -1041,7 +1041,7 @@ fn test_program_bpf_ro_modify() {
let result = bank_client.send_and_confirm_message(&[&mint_keypair, &test_keypair], message);
assert_eq!(
result.unwrap_err().unwrap(),
TransactionError::InstructionError(0, InstructionError::Custom(0xb9f0002))
TransactionError::InstructionError(0, InstructionError::ProgramFailedToComplete)
);
let instruction = Instruction::new(program_pubkey, &[4_u8], account_metas.clone());
@@ -1049,7 +1049,7 @@ fn test_program_bpf_ro_modify() {
let result = bank_client.send_and_confirm_message(&[&mint_keypair, &test_keypair], message);
assert_eq!(
result.unwrap_err().unwrap(),
TransactionError::InstructionError(0, InstructionError::Custom(0xb9f0002))
TransactionError::InstructionError(0, InstructionError::ProgramFailedToComplete)
);
}