Fix priv escalation test (#14046)

This commit is contained in:
Jack May
2020-12-10 14:36:33 -08:00
committed by GitHub
parent 68109a46e0
commit 5ea80e673f
5 changed files with 14 additions and 7 deletions

View File

@ -154,6 +154,7 @@ extern uint64_t entrypoint(const uint8_t *input) {
}
case TEST_VERIFY_PRIVILEGE_ESCALATION: {
sol_log("Success");
break;
}
case TEST_NESTED_INVOKE: {
sol_log("invoke");

View File

@ -699,7 +699,7 @@ fn test_program_bpf_invoke() {
assert_eq!(invoked_programs, vec![invoked_program_id.clone()]);
assert_eq!(
result.unwrap_err(),
TransactionError::InstructionError(0, InstructionError::Custom(194969602))
TransactionError::InstructionError(0, InstructionError::PrivilegeEscalation)
);
let instruction = Instruction::new(
@ -731,7 +731,7 @@ fn test_program_bpf_invoke() {
assert_eq!(invoked_programs, vec![invoked_program_id.clone()]);
assert_eq!(
result.unwrap_err(),
TransactionError::InstructionError(0, InstructionError::Custom(194969602))
TransactionError::InstructionError(0, InstructionError::PrivilegeEscalation)
);
let instruction = Instruction::new(