Refactor: process_instruction() (#20448)

* Adds first_instruction_account parameter to process_instruction().

* Removes InvokeContext::remove_first_keyed_account() from all BPF loaders.

* Removes InvokeContext::remove_first_keyed_account() from all builtin programs.

* Removes InvokeContext::remove_first_keyed_account() from all mock ups.

* Deprecates InvokeContext::remove_first_keyed_account().

* Documents index base of keyed_account_at_index().

* Adds dynamic offset to call sites of "keyed_account_at_index()".
This commit is contained in:
Alexander Meißner
2021-10-08 11:41:07 +02:00
committed by GitHub
parent a6a4cfda89
commit 4e65487d2f
17 changed files with 1364 additions and 1366 deletions

View File

@ -80,6 +80,7 @@ macro_rules! declare_builtin_name {
///
/// fn my_process_instruction(
/// program_id: &Pubkey,
/// first_instruction_account: usize,
/// keyed_accounts: &[KeyedAccount],
/// instruction_data: &[u8],
/// ) -> Result<(), InstructionError> {
@ -111,6 +112,7 @@ macro_rules! declare_builtin_name {
///
/// fn my_process_instruction(
/// program_id: &Pubkey,
/// first_instruction_account: usize,
/// keyed_accounts: &[KeyedAccount],
/// instruction_data: &[u8],
/// ) -> Result<(), InstructionError> {