Record instructions after account translation (#13845)
(cherry picked from commit cc78667118
)
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@ -1188,8 +1188,7 @@ fn call<'a>(
|
|||||||
ro_regions,
|
ro_regions,
|
||||||
)?;
|
)?;
|
||||||
verify_instruction(syscall, &instruction, &signers)?;
|
verify_instruction(syscall, &instruction, &signers)?;
|
||||||
invoke_context.record_instruction(&instruction);
|
let message = Message::new(&[instruction.clone()], None);
|
||||||
let message = Message::new(&[instruction], None);
|
|
||||||
let callee_program_id_index = message.instructions[0].program_id_index as usize;
|
let callee_program_id_index = message.instructions[0].program_id_index as usize;
|
||||||
let callee_program_id = message.account_keys[callee_program_id_index];
|
let callee_program_id = message.account_keys[callee_program_id_index];
|
||||||
let (accounts, account_refs) = syscall.translate_accounts(
|
let (accounts, account_refs) = syscall.translate_accounts(
|
||||||
@ -1200,6 +1199,8 @@ fn call<'a>(
|
|||||||
rw_regions,
|
rw_regions,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
invoke_context.record_instruction(&instruction);
|
||||||
|
|
||||||
// Process instruction
|
// Process instruction
|
||||||
|
|
||||||
let program_account = (*accounts[callee_program_id_index]).clone();
|
let program_account = (*accounts[callee_program_id_index]).clone();
|
||||||
|
Reference in New Issue
Block a user