Unifies ThisInvokeContext and dyn trait InvokeContext. (#21563)

This commit is contained in:
Alexander Meißner
2021-12-02 18:47:16 +01:00
committed by GitHub
parent 8dfa83c579
commit bfdb775ffc
21 changed files with 366 additions and 431 deletions

View File

@@ -33,7 +33,7 @@ use thiserror::Error;
pub type LoaderEntrypoint = unsafe extern "C" fn(
program_id: &Pubkey,
instruction_data: &[u8],
invoke_context: &dyn InvokeContext,
invoke_context: &InvokeContext,
) -> Result<(), InstructionError>;
// Prototype of a native program entry point
@@ -165,7 +165,7 @@ impl NativeLoader {
&self,
first_instruction_account: usize,
instruction_data: &[u8],
invoke_context: &mut dyn InvokeContext,
invoke_context: &mut InvokeContext,
) -> Result<(), InstructionError> {
let (program_id, name_vec) = {
let program_id = invoke_context.get_caller()?;