Cap seeds not signers (#13941)

This commit is contained in:
Jack May
2020-12-03 09:58:25 -08:00
committed by GitHub
parent 1c51711c75
commit 661ca52135
4 changed files with 81 additions and 6 deletions

View File

@ -21,6 +21,7 @@ const TEST_PRIVILEGE_ESCALATION_SIGNER: u8 = 2;
const TEST_PRIVILEGE_ESCALATION_WRITABLE: u8 = 3;
const TEST_PPROGRAM_NOT_EXECUTABLE: u8 = 4;
const TEST_EMPTY_ACCOUNTS_SLICE: u8 = 5;
const TEST_CAP_SEEDS: u8 = 6;
// const MINT_INDEX: usize = 0;
const ARGUMENT_INDEX: usize = 1;
@ -372,6 +373,18 @@ fn process_instruction(
let instruction = create_instruction(*accounts[INVOKED_PROGRAM_INDEX].key, &[], vec![]);
invoke(&instruction, &[])?;
}
TEST_CAP_SEEDS => {
msg!("Test program max seeds");
let instruction = create_instruction(*accounts[INVOKED_PROGRAM_INDEX].key, &[], vec![]);
invoke_signed(
&instruction,
accounts,
&[&[
b"1", b"2", b"3", b"4", b"5", b"6", b"7", b"8", b"9", b"0", b"1", b"2", b"3",
b"4", b"5", b"6", b"7",
]],
)?;
}
_ => panic!(),
}