Move process_instruction defs to runtime (#12507)
This commit is contained in:
@ -14,15 +14,15 @@ use solana_runtime::{
|
||||
bank_client::BankClient,
|
||||
genesis_utils::{create_genesis_config, GenesisConfigInfo},
|
||||
loader_utils::load_program,
|
||||
process_instruction::{
|
||||
ComputeBudget, ComputeMeter, Executor, InvokeContext, Logger, ProcessInstruction,
|
||||
},
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
bpf_loader,
|
||||
client::SyncClient,
|
||||
entrypoint::SUCCESS,
|
||||
entrypoint_native::{
|
||||
ComputeBudget, ComputeMeter, Executor, InvokeContext, Logger, ProcessInstruction,
|
||||
},
|
||||
instruction::{AccountMeta, CompiledInstruction, Instruction, InstructionError},
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
|
@ -13,6 +13,9 @@ use solana_runtime::{
|
||||
bank_client::BankClient,
|
||||
genesis_utils::{create_genesis_config, GenesisConfigInfo},
|
||||
loader_utils::load_program,
|
||||
process_instruction::{
|
||||
ComputeBudget, ComputeMeter, Executor, InvokeContext, Logger, ProcessInstruction,
|
||||
},
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::{Account, KeyedAccount},
|
||||
@ -20,9 +23,7 @@ use solana_sdk::{
|
||||
client::SyncClient,
|
||||
clock::{DEFAULT_SLOTS_PER_EPOCH, MAX_PROCESSING_AGE},
|
||||
entrypoint::{MAX_PERMITTED_DATA_INCREASE, SUCCESS},
|
||||
entrypoint_native::{
|
||||
ComputeBudget, ComputeMeter, Executor, InvokeContext, Logger, ProcessInstruction,
|
||||
},
|
||||
|
||||
instruction::{AccountMeta, CompiledInstruction, Instruction, InstructionError},
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
@ -629,12 +630,12 @@ fn assert_instruction_count() {
|
||||
("solana_bpf_rust_128bit", 543),
|
||||
("solana_bpf_rust_alloc", 19082),
|
||||
("solana_bpf_rust_dep_crate", 2),
|
||||
("solana_bpf_rust_external_spend", 473),
|
||||
("solana_bpf_rust_external_spend", 477),
|
||||
("solana_bpf_rust_iter", 723),
|
||||
("solana_bpf_rust_many_args", 231),
|
||||
("solana_bpf_rust_noop", 447),
|
||||
("solana_bpf_rust_noop", 451),
|
||||
("solana_bpf_rust_param_passing", 54),
|
||||
("solana_bpf_rust_sanity", 2211),
|
||||
("solana_bpf_rust_sanity", 2215),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -16,12 +16,12 @@ use solana_rbpf::{
|
||||
memory_region::MemoryRegion,
|
||||
vm::{EbpfVm, Executable, InstructionMeter},
|
||||
};
|
||||
use solana_runtime::process_instruction::{ComputeMeter, Executor, InvokeContext};
|
||||
use solana_sdk::{
|
||||
account::{is_executable, next_keyed_account, KeyedAccount},
|
||||
bpf_loader, bpf_loader_deprecated,
|
||||
decode_error::DecodeError,
|
||||
entrypoint::SUCCESS,
|
||||
entrypoint_native::{ComputeMeter, Executor, InvokeContext},
|
||||
instruction::InstructionError,
|
||||
loader_instruction::LoaderInstruction,
|
||||
program_utils::limited_deserialize,
|
||||
@ -270,14 +270,13 @@ impl Executor for BPFExecutor {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use rand::Rng;
|
||||
use solana_runtime::message_processor::{Executors, ThisInvokeContext};
|
||||
use solana_runtime::{
|
||||
message_processor::{Executors, ThisInvokeContext},
|
||||
process_instruction::{ComputeBudget, Logger, ProcessInstruction},
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
entrypoint_native::{ComputeBudget, Logger, ProcessInstruction},
|
||||
instruction::CompiledInstruction,
|
||||
instruction::Instruction,
|
||||
message::Message,
|
||||
rent::Rent,
|
||||
account::Account, instruction::CompiledInstruction, instruction::Instruction,
|
||||
message::Message, rent::Rent,
|
||||
};
|
||||
use std::{cell::RefCell, fs::File, io::Read, ops::Range, rc::Rc};
|
||||
|
||||
|
@ -6,14 +6,16 @@ use solana_rbpf::{
|
||||
memory_region::{translate_addr, MemoryRegion},
|
||||
vm::{EbpfVm, SyscallObject},
|
||||
};
|
||||
use solana_runtime::message_processor::MessageProcessor;
|
||||
use solana_runtime::{
|
||||
message_processor::MessageProcessor,
|
||||
process_instruction::{ComputeMeter, InvokeContext, Logger},
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
account::KeyedAccount,
|
||||
account_info::AccountInfo,
|
||||
bpf_loader, bpf_loader_deprecated,
|
||||
entrypoint::{MAX_PERMITTED_DATA_INCREASE, SUCCESS},
|
||||
entrypoint_native::{ComputeMeter, InvokeContext, Logger},
|
||||
instruction::{AccountMeta, Instruction, InstructionError},
|
||||
message::Message,
|
||||
program_error::ProgramError,
|
||||
|
Reference in New Issue
Block a user