* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633)"

* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().

* instruction_accounts => instructions_account

(cherry picked from commit ba8e15848e)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
This commit is contained in:
mergify[bot]
2021-12-21 17:54:18 +00:00
committed by GitHub
parent c296a6c9ed
commit 75fe0d3ecf
3 changed files with 23 additions and 18 deletions

View File

@ -1449,7 +1449,10 @@ fn test_program_bpf_instruction_introspection() {
);
// Passing transaction
let account_metas = vec![AccountMeta::new_readonly(sysvar::instructions::id(), false)];
let account_metas = vec![
AccountMeta::new(program_id, false),
AccountMeta::new(sysvar::instructions::id(), false),
];
let instruction0 = Instruction::new_with_bytes(program_id, &[0u8, 0u8], account_metas.clone());
let instruction1 = Instruction::new_with_bytes(program_id, &[0u8, 1u8], account_metas.clone());
let instruction2 = Instruction::new_with_bytes(program_id, &[0u8, 2u8], account_metas);