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:
committed by
GitHub
parent
c3e5927d16
commit
e540b1cf3c
@ -9,7 +9,10 @@ use {
|
||||
log::*,
|
||||
solana_banks_client::start_client,
|
||||
solana_banks_server::banks_server::start_local_server,
|
||||
solana_program_runtime::instruction_processor::InstructionProcessor,
|
||||
solana_program_runtime::{
|
||||
instruction_processor::InstructionProcessor, invoke_context::ProcessInstructionWithContext,
|
||||
stable_log,
|
||||
},
|
||||
solana_runtime::{
|
||||
bank::{Bank, ExecuteTimings},
|
||||
bank_forks::BankForks,
|
||||
@ -33,7 +36,6 @@ use {
|
||||
message::Message,
|
||||
native_token::sol_to_lamports,
|
||||
poh_config::PohConfig,
|
||||
process_instruction::{stable_log, InvokeContext, ProcessInstructionWithContext},
|
||||
program_error::{ProgramError, ACCOUNT_BORROW_FAILED, UNSUPPORTED_SYSVAR},
|
||||
pubkey::Pubkey,
|
||||
rent::Rent,
|
||||
@ -66,6 +68,7 @@ use {
|
||||
|
||||
// Export types so test clients can limit their solana crate dependencies
|
||||
pub use solana_banks_client::BanksClient;
|
||||
pub use solana_program_runtime::invoke_context::InvokeContext;
|
||||
|
||||
// Export tokio for test clients
|
||||
pub use tokio;
|
||||
@ -187,7 +190,7 @@ macro_rules! processor {
|
||||
Some(
|
||||
|first_instruction_account: usize,
|
||||
input: &[u8],
|
||||
invoke_context: &mut dyn solana_sdk::process_instruction::InvokeContext| {
|
||||
invoke_context: &mut dyn solana_program_test::InvokeContext| {
|
||||
$crate::builtin_process_instruction(
|
||||
$process_instruction,
|
||||
first_instruction_account,
|
||||
|
Reference in New Issue
Block a user