Adds TEST_DUPLICATE_PRIVILEGE_ESCALATION_SIGNER and TEST_DUPLICATE_PRIVILEGE_ESCALATION_WRITABLE. (#22790)

This commit is contained in:
Alexander Meißner
2022-01-28 00:52:09 +01:00
committed by GitHub
parent 4d891043d1
commit 2804204f80
4 changed files with 86 additions and 1 deletions

View File

@@ -1103,6 +1103,18 @@ fn test_program_bpf_invoke_sanity() {
&[],
);
do_invoke_failure_test_local(
TEST_DUPLICATE_PRIVILEGE_ESCALATION_SIGNER,
TransactionError::InstructionError(0, InstructionError::PrivilegeEscalation),
&[invoked_program_id.clone()],
);
do_invoke_failure_test_local(
TEST_DUPLICATE_PRIVILEGE_ESCALATION_WRITABLE,
TransactionError::InstructionError(0, InstructionError::PrivilegeEscalation),
&[invoked_program_id.clone()],
);
// Check resulting state
assert_eq!(43, bank.get_balance(&derived_key1));