chore: Introduce helper type for evm cfg and env tuple (#13377)

This commit is contained in:
Ayodeji Akinola
2024-12-14 09:53:59 +01:00
committed by GitHub
parent 16f6d7a0c3
commit b525231224
33 changed files with 290 additions and 165 deletions

View File

@ -14,6 +14,7 @@ reth-node-core.workspace = true
reth-primitives.workspace = true
reth-node-ethereum = { workspace = true, features = ["test-utils"] }
reth-tracing.workspace = true
reth-evm.workspace = true
alloy-genesis.workspace = true
alloy-primitives.workspace = true
alloy-consensus.workspace = true

View File

@ -15,7 +15,7 @@ use reth::{
handler::register::EvmHandler,
inspector_handle_register,
precompile::{Precompile, PrecompileOutput, PrecompileSpecId},
primitives::{BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
primitives::{CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
ContextPrecompiles, Database, Evm, EvmBuilder, GetInspector,
},
rpc::types::engine::PayloadAttributes,
@ -23,6 +23,7 @@ use reth::{
transaction_pool::{PoolTransaction, TransactionPool},
};
use reth_chainspec::{Chain, ChainSpec};
use reth_evm::env::EvmEnv;
use reth_evm_ethereum::EthEvmConfig;
use reth_node_api::{
ConfigureEvm, ConfigureEvmEnv, FullNodeTypes, NextBlockEnvAttributes, NodeTypes,
@ -115,7 +116,7 @@ impl ConfigureEvmEnv for MyEvmConfig {
&self,
parent: &Self::Header,
attributes: NextBlockEnvAttributes,
) -> Result<(CfgEnvWithHandlerCfg, BlockEnv), Self::Error> {
) -> Result<EvmEnv, Self::Error> {
self.inner.next_cfg_and_block_env(parent, attributes)
}
}