From 079b7b9d57e15debd1a74f388fa87bd57666c663 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 11 Feb 2026 17:43:55 +0100 Subject: [PATCH] fix: don't drop node (#22063) --- bin/reth/src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/reth/src/main.rs b/bin/reth/src/main.rs index cce02dfe24..597a0fa597 100644 --- a/bin/reth/src/main.rs +++ b/bin/reth/src/main.rs @@ -10,7 +10,6 @@ static MALLOC_CONF: &[u8] = b"prof:true,prof_active:true,lg_prof_sample:19\0"; use clap::Parser; use reth::cli::Cli; use reth_ethereum_cli::chainspec::EthereumChainSpecParser; -use reth_node_builder::NodeHandle; use reth_node_ethereum::EthereumNode; use tracing::info; @@ -24,10 +23,9 @@ fn main() { if let Err(err) = Cli::::parse().run(async move |builder, _| { info!(target: "reth::cli", "Launching node"); - let NodeHandle { node_exit_future, .. } = - builder.node(EthereumNode::default()).launch_with_debug_capabilities().await?; + let handle = builder.node(EthereumNode::default()).launch_with_debug_capabilities().await?; - node_exit_future.await + handle.wait_for_node_exit().await }) { eprintln!("Error: {err:?}"); std::process::exit(1);