refactor: dedup runtime initializations (#22263)

Co-authored-by: Alexey Shekhirin <github@shekhirin.com>
This commit is contained in:
DaniPopes
2026-02-17 18:35:31 +01:00
committed by GitHub
parent 6ff4f947c8
commit 0ba685386d
72 changed files with 275 additions and 318 deletions

View File

@@ -14,6 +14,7 @@ use reth_ethereum::{
config::rng_secret_key, NetworkConfig, NetworkEventListenerProvider, NetworkManager,
},
provider::test_utils::NoopProvider,
tasks::Runtime,
};
#[tokio::main]
@@ -25,7 +26,8 @@ async fn main() -> eyre::Result<()> {
let local_key = rng_secret_key();
// Configure the network
let config = NetworkConfig::builder(local_key).mainnet_boot_nodes().build(client);
let config =
NetworkConfig::builder(local_key, Runtime::test()).mainnet_boot_nodes().build(client);
// create the network instance
let network = NetworkManager::eth(config).await?;