* 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
This commit is contained in:
Alexander Meißner
2021-12-21 12:53:22 +01:00
committed by GitHub
parent 41ec7c8be9
commit ba8e15848e
5 changed files with 35 additions and 21 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);