CPI Account Reuse (#19762)
* Removes two account copy steps from InstructionProcessor::native_invoke(). * Moves gathering of keyed_accounts, caller_write_privileges and program_indices into InstructionProcessor::create_message(). * Explicitly routes the serialized account lengths to enable sharing of existing account structures. * Recycles existing account structs in CPI syscall.
This commit is contained in:
committed by
GitHub
parent
efd024510a
commit
36f46e1c31
@ -170,7 +170,8 @@ native machine code before execting it in the virtual machine.",
|
||||
}
|
||||
let lid = bpf_loader::id();
|
||||
let pid = Pubkey::new(&[0u8; 32]);
|
||||
let mut bytes = serialize_parameters(&lid, &pid, &accounts, &input.insndata).unwrap();
|
||||
let (mut bytes, _account_lenghts) =
|
||||
serialize_parameters(&lid, &pid, &accounts, &input.insndata).unwrap();
|
||||
Vec::from(bytes.as_slice_mut())
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user