feat: global runtime (#21934)

This commit is contained in:
DaniPopes
2026-02-11 04:45:09 +01:00
committed by GitHub
parent 33467ea6dd
commit 68e4ff1f7d
119 changed files with 1612 additions and 1126 deletions

View File

@@ -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