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

@@ -17,12 +17,12 @@ use reth_ethereum::{
},
provider::CanonStateSubscriptions,
rpc::api::eth::helpers::EthTransactions,
tasks::TaskManager,
tasks::Runtime,
};
#[tokio::main]
async fn main() -> eyre::Result<()> {
let tasks = TaskManager::current();
let runtime = Runtime::with_existing_handle(tokio::runtime::Handle::current())?;
// create node config
let node_config = NodeConfig::test()
@@ -31,7 +31,7 @@ async fn main() -> eyre::Result<()> {
.with_chain(custom_chain());
let NodeHandle { node, node_exit_future: _ } = NodeBuilder::new(node_config)
.testing_node(tasks.executor())
.testing_node(runtime)
.node(EthereumNode::default())
.launch_with_debug_capabilities()
.await?;