fix: fuse shutdown (#20580)

This commit is contained in:
Matthias Seitz
2025-12-23 02:09:45 +01:00
committed by GitHub
parent 538de9e456
commit 21934d9946

View File

@@ -9,7 +9,7 @@ use crate::{
NodeBuilderWithComponents, NodeComponents, NodeComponentsBuilder, NodeHandle, NodeTypesAdapter,
};
use alloy_consensus::BlockHeader;
use futures::{stream_select, StreamExt};
use futures::{stream_select, FutureExt, StreamExt};
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_engine_service::service::{ChainEvent, EngineService};
use reth_engine_tree::{
@@ -270,7 +270,7 @@ impl EngineNodeLauncher {
} = add_ons.launch_add_ons(add_ons_ctx).await?;
// Create engine shutdown handle
let (engine_shutdown, mut shutdown_rx) = EngineShutdown::new();
let (engine_shutdown, shutdown_rx) = EngineShutdown::new();
// Run consensus engine to completion
let initial_target = ctx.initial_backfill_target()?;
@@ -300,6 +300,7 @@ impl EngineNodeLauncher {
}
let mut res = Ok(());
let mut shutdown_rx = shutdown_rx.fuse();
// advance the chain and await payloads built locally to add into the engine api tree handler to prevent re-execution if that block is received as payload from the CL
loop {