mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
feat: global runtime (#21934)
This commit is contained in:
@@ -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?;
|
||||
|
||||
Reference in New Issue
Block a user