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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user