From b1aab0dd71e7d582926a6bbeab7947d305fae5e1 Mon Sep 17 00:00:00 2001 From: Jack May Date: Wed, 19 Jan 2022 08:49:14 -0800 Subject: [PATCH] rename --- programs/bpf_loader/src/syscalls.rs | 10 +++++++--- sdk/program/src/instruction.rs | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/programs/bpf_loader/src/syscalls.rs b/programs/bpf_loader/src/syscalls.rs index d7cf4eca73958f..a583af0363e10a 100644 --- a/programs/bpf_loader/src/syscalls.rs +++ b/programs/bpf_loader/src/syscalls.rs @@ -29,7 +29,7 @@ use { sol_log_data_syscall_enabled, update_syscall_base_costs, }, hash::{Hasher, HASH_BYTES}, - instruction::{AccountMeta, InnerMeta, Instruction, InstructionError}, + instruction::{AccountMeta, Instruction, InstructionError, ProcessedInnerInstruction}, keccak, native_loader, precompiles::is_precompile, program::MAX_RETURN_DATA, @@ -3034,12 +3034,16 @@ impl<'a, 'b> SyscallObject for SyscallGetProcessedInnerInstruction<'a, if let Some((stack_depth, instruction)) = invoke_context.get_processed_inner_instruction(index as usize) { - let InnerMeta { + let ProcessedInnerInstruction { data_len, accounts_len, depth, } = question_mark!( - translate_type_mut::(memory_mapping, meta_addr, &loader_id), + translate_type_mut::( + memory_mapping, + meta_addr, + &loader_id + ), result ); if *data_len >= instruction.data.len() && *accounts_len >= instruction.accounts.len() { diff --git a/sdk/program/src/instruction.rs b/sdk/program/src/instruction.rs index b271d3c2d6ae0e..da150b767603d3 100644 --- a/sdk/program/src/instruction.rs +++ b/sdk/program/src/instruction.rs @@ -650,7 +650,7 @@ impl CompiledInstruction { /// when calling the `sol_get_processed_inner_instruction` syscall. #[repr(C)] #[derive(Default, Debug, Clone, Copy)] -pub struct InnerMeta { +pub struct ProcessedInnerInstruction { pub data_len: usize, pub accounts_len: usize, pub depth: usize, @@ -673,14 +673,14 @@ pub fn get_processed_inner_instruction(index: usize) -> Option<(usize, Instructi extern "C" { fn sol_get_processed_inner_instruction( index: u64, - meta: *mut InnerMeta, + meta: *mut ProcessedInnerInstruction, program_id: *mut Pubkey, data: *mut u8, accounts: *mut AccountMeta, ) -> u64; } - let mut meta = InnerMeta::default(); + let mut meta = ProcessedInnerInstruction::default(); let mut program_id = Pubkey::default(); if 1 == unsafe {