Refactor: Move sdk::process_instruction in program-runtime-crate (#21180)

* Moves the Executor dyn Trait to instruction_processor.rs

* Moves the Logger dyn Trait as well as the ic_msg and ic_logger_msg macros to log_collector.rs,
and moves the stable_log to stable_log.rs

* Moves the ComputeMeter dyn Trait to invoke_context.rs

* Moves the InvokeContext dyn Trait and the ProcessInstructionWithContext type to invoke_context.rs

* Updates cargo files.

* Re-export InvokeContext in program-test

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
This commit is contained in:
Alexander Meißner
2021-11-17 19:35:07 +01:00
committed by GitHub
parent c3e5927d16
commit e540b1cf3c
35 changed files with 319 additions and 317 deletions

View File

@ -3,7 +3,7 @@ use solana_measure::measure::Measure;
use solana_program_runtime::{
instruction_processor::{ExecuteDetailsTimings, Executors, InstructionProcessor},
instruction_recorder::InstructionRecorder,
invoke_context::ThisInvokeContext,
invoke_context::{ComputeMeter, InvokeContext, ThisInvokeContext},
log_collector::LogCollector,
};
use solana_sdk::{
@ -13,7 +13,6 @@ use solana_sdk::{
hash::Hash,
message::Message,
precompiles::is_precompile,
process_instruction::{ComputeMeter, InvokeContext},
pubkey::Pubkey,
rent::Rent,
sysvar::instructions,