Don't use caller passed executable account (#14276) (#14277)

(cherry picked from commit b1d702a618)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2020-12-23 23:52:04 +00:00
committed by GitHub
parent a9a2c76221
commit 0020e43476
5 changed files with 78 additions and 101 deletions

View File

@@ -385,7 +385,11 @@ fn process_instruction(
}
TEST_EMPTY_ACCOUNTS_SLICE => {
msg!("Empty accounts slice");
let instruction = create_instruction(*accounts[INVOKED_PROGRAM_INDEX].key, &[], vec![]);
let instruction = create_instruction(
*accounts[INVOKED_PROGRAM_INDEX].key,
&[(accounts[INVOKED_ARGUMENT_INDEX].key, false, false)],
vec![],
);
invoke(&instruction, &[])?;
}
TEST_CAP_SEEDS => {