mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: move ValidationApi setup to EthereumAddOns (#14342)
This commit is contained in:
@ -34,9 +34,7 @@ use reth::rpc::builder::{
|
||||
// Configuring the network parts, ideally also wouldn't need to think about this.
|
||||
use myrpc_ext::{MyRpcExt, MyRpcExtApiServer};
|
||||
use reth::tasks::TokioTaskExecutor;
|
||||
use reth_node_ethereum::{
|
||||
node::EthereumEngineValidator, EthEvmConfig, EthExecutorProvider, EthereumNode,
|
||||
};
|
||||
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider, EthereumNode};
|
||||
use reth_provider::ChainSpecProvider;
|
||||
|
||||
// Custom rpc extension
|
||||
@ -75,11 +73,7 @@ async fn main() -> eyre::Result<()> {
|
||||
|
||||
// Pick which namespaces to expose.
|
||||
let config = TransportRpcModuleConfig::default().with_http([RethRpcModule::Eth]);
|
||||
let mut server = rpc_builder.build(
|
||||
config,
|
||||
Box::new(EthApi::with_spawner),
|
||||
Arc::new(EthereumEngineValidator::new(spec)),
|
||||
);
|
||||
let mut server = rpc_builder.build(config, Box::new(EthApi::with_spawner));
|
||||
|
||||
// Add a custom rpc namespace
|
||||
let custom_rpc = MyRpcExt { provider };
|
||||
|
||||
Reference in New Issue
Block a user