feat: Support custom EvmConfig for ethereumpayload builder (#10117)

This commit is contained in:
nk_ysg
2024-08-06 17:39:53 +08:00
committed by GitHub
parent 08158e4449
commit e93d36a35e
2 changed files with 27 additions and 8 deletions

View File

@ -22,7 +22,10 @@ use reth_chainspec::{Chain, ChainSpec, Head};
use reth_evm_ethereum::EthEvmConfig;
use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, FullNodeTypes};
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
use reth_node_ethereum::{node::EthereumAddOns, EthExecutorProvider, EthereumNode};
use reth_node_ethereum::{
node::{EthereumAddOns, EthereumPayloadBuilder},
EthExecutorProvider, EthereumNode,
};
use reth_primitives::{
revm_primitives::{AnalysisKind, CfgEnvWithHandlerCfg, TxEnv},
Address, Header, TransactionSigned, U256,
@ -181,7 +184,11 @@ async fn main() -> eyre::Result<()> {
// configure the node with regular ethereum types
.with_types::<EthereumNode>()
// use default ethereum components but with our executor
.with_components(EthereumNode::components().executor(MyExecutorBuilder::default()))
.with_components(
EthereumNode::components()
.executor(MyExecutorBuilder::default())
.payload(EthereumPayloadBuilder::new(MyEvmConfig::default())),
)
.with_add_ons::<EthereumAddOns>()
.launch()
.await