mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
feat: global runtime (#21934)
This commit is contained in:
@@ -33,7 +33,7 @@ use reth_ethereum::{
|
||||
node::EthereumAddOns,
|
||||
EthEvmConfig, EthereumNode,
|
||||
},
|
||||
tasks::TaskManager,
|
||||
tasks::Runtime,
|
||||
EthPrimitives,
|
||||
};
|
||||
use reth_tracing::{RethTracer, Tracer};
|
||||
@@ -187,7 +187,7 @@ where
|
||||
async fn main() -> eyre::Result<()> {
|
||||
let _guard = RethTracer::new().init()?;
|
||||
|
||||
let tasks = TaskManager::current();
|
||||
let runtime = Runtime::with_existing_handle(tokio::runtime::Handle::current())?;
|
||||
|
||||
// create a custom chain spec
|
||||
let spec = ChainSpec::builder()
|
||||
@@ -203,7 +203,7 @@ async fn main() -> eyre::Result<()> {
|
||||
NodeConfig::test().with_rpc(RpcServerArgs::default().with_http()).with_chain(spec);
|
||||
|
||||
let handle = NodeBuilder::new(node_config)
|
||||
.testing_node(tasks.executor())
|
||||
.testing_node(runtime)
|
||||
// configure the node with regular ethereum types
|
||||
.with_types::<EthereumNode>()
|
||||
// use default ethereum components but with our executor
|
||||
|
||||
Reference in New Issue
Block a user