Cap CPI signers (#14021)

This commit is contained in:
Jack May
2020-12-09 02:14:53 -08:00
committed by GitHub
parent e1872a450a
commit e1a4251b07
5 changed files with 147 additions and 36 deletions

View File

@ -22,6 +22,7 @@ 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 TEST_CAP_SIGNERS: u8 = 7;
// const MINT_INDEX: usize = 0;
const ARGUMENT_INDEX: usize = 1;
@ -385,6 +386,33 @@ fn process_instruction(
]],
)?;
}
TEST_CAP_SIGNERS => {
msg!("Test program max signers");
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!(),
}