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

@@ -54,7 +54,7 @@ use reth_ethereum::{
primitives::{Block, SealedBlock},
provider::{EthStorage, StateProviderFactory},
rpc::types::engine::ExecutionPayload,
tasks::TaskManager,
tasks::Runtime,
EthPrimitives, TransactionSigned,
};
use reth_ethereum_payload_builder::{EthereumBuilderConfig, EthereumExecutionPayloadValidator};
@@ -391,7 +391,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 genesis with canyon at block 2
let spec = ChainSpec::builder()
@@ -407,7 +407,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)
.launch_node(MyCustomNode::default())
.await
.unwrap();