Refactor: move compute budget runtime logic into solana-program-runtime (#22543)

This commit is contained in:
Justin Starry
2022-01-17 20:48:00 +08:00
committed by GitHub
parent 5e5cdf397c
commit cc76a73c49
8 changed files with 316 additions and 292 deletions

View File

@ -74,6 +74,7 @@ use {
solana_measure::measure::Measure,
solana_metrics::{inc_new_counter_debug, inc_new_counter_info},
solana_program_runtime::{
compute_budget::ComputeBudget,
instruction_recorder::InstructionRecorder,
invoke_context::{
BuiltinProgram, Executor, Executors, ProcessInstructionWithContext, TransactionExecutor,
@ -93,7 +94,6 @@ use {
INITIAL_RENT_EPOCH, MAX_PROCESSING_AGE, MAX_RECENT_BLOCKHASHES,
MAX_TRANSACTION_FORWARDING_DELAY, SECONDS_PER_DAY,
},
compute_budget::ComputeBudget,
ed25519_program,
epoch_info::EpochInfo,
epoch_schedule::EpochSchedule,

View File

@ -2,6 +2,7 @@ use {
serde::{Deserialize, Serialize},
solana_measure::measure::Measure,
solana_program_runtime::{
compute_budget::ComputeBudget,
instruction_recorder::InstructionRecorder,
invoke_context::{BuiltinProgram, Executors, InvokeContext},
log_collector::LogCollector,
@ -10,7 +11,6 @@ use {
},
solana_sdk::{
account::WritableAccount,
compute_budget::ComputeBudget,
feature_set::{prevent_calling_precompiles_as_programs, FeatureSet},
hash::Hash,
message::SanitizedMessage,