mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix: Set node to idle if no initial backfill sync is performed
This commit is contained in:
@@ -275,7 +275,10 @@ impl EngineNodeLauncher {
|
||||
ctx.task_executor().spawn_critical("consensus engine", Box::pin(async move {
|
||||
if let Some(initial_target) = initial_target {
|
||||
debug!(target: "reth::cli", %initial_target, "start backfill sync");
|
||||
// network_handle's sync state is already initialized at Syncing
|
||||
engine_service.orchestrator_mut().start_backfill_sync(initial_target);
|
||||
} else {
|
||||
network_handle.update_sync_state(SyncState::Idle);
|
||||
}
|
||||
|
||||
let mut res = Ok(());
|
||||
@@ -298,6 +301,7 @@ impl EngineNodeLauncher {
|
||||
debug!(target: "reth::cli", "Terminating after initial backfill");
|
||||
break
|
||||
}
|
||||
network_handle.update_sync_state(SyncState::Idle);
|
||||
}
|
||||
ChainEvent::BackfillSyncStarted => {
|
||||
network_handle.update_sync_state(SyncState::Syncing);
|
||||
|
||||
Reference in New Issue
Block a user