mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: Introduce helper type for evm cfg and env tuple (#13377)
This commit is contained in:
@ -6,7 +6,8 @@ use pretty_assertions::Comparison;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_engine_primitives::InvalidBlockHook;
|
||||
use reth_evm::{
|
||||
state_change::post_block_balance_increments, system_calls::SystemCaller, ConfigureEvm,
|
||||
env::EvmEnv, state_change::post_block_balance_increments, system_calls::SystemCaller,
|
||||
ConfigureEvm,
|
||||
};
|
||||
use reth_primitives::{NodePrimitives, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_primitives_traits::SignedTransaction;
|
||||
@ -77,12 +78,17 @@ where
|
||||
.build();
|
||||
|
||||
// Setup environment for the execution.
|
||||
let (cfg, block_env) = self.evm_config.cfg_and_block_env(block.header(), U256::MAX);
|
||||
let EvmEnv { cfg_env_with_handler_cfg, block_env } =
|
||||
self.evm_config.cfg_and_block_env(block.header(), U256::MAX);
|
||||
|
||||
// Setup EVM
|
||||
let mut evm = self.evm_config.evm_with_env(
|
||||
&mut db,
|
||||
EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, Default::default()),
|
||||
EnvWithHandlerCfg::new_with_cfg_env(
|
||||
cfg_env_with_handler_cfg,
|
||||
block_env,
|
||||
Default::default(),
|
||||
),
|
||||
);
|
||||
|
||||
let mut system_caller =
|
||||
|
||||
Reference in New Issue
Block a user