From c29d733f5c750bfcd1ecc5c95498e3a3ab83dc36 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Thu, 23 Mar 2023 19:15:16 +0200 Subject: [PATCH] fix(sync): done flag for index history stages (#1935) --- crates/stages/src/stages/index_account_history.rs | 2 +- crates/stages/src/stages/index_storage_history.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/stages/src/stages/index_account_history.rs b/crates/stages/src/stages/index_account_history.rs index 55ea9a3233..0d30e9e2fd 100644 --- a/crates/stages/src/stages/index_account_history.rs +++ b/crates/stages/src/stages/index_account_history.rs @@ -53,7 +53,7 @@ impl Stage for IndexAccountHistoryStage { tx.insert_account_history_index(indices)?; info!(target: "sync::stages::index_account_history", "Stage finished"); - Ok(ExecOutput { stage_progress: to_block, done: true }) + Ok(ExecOutput { stage_progress: to_block, done: to_block == previous_stage_progress }) } /// Unwind the stage. diff --git a/crates/stages/src/stages/index_storage_history.rs b/crates/stages/src/stages/index_storage_history.rs index 6431d12f58..390039d536 100644 --- a/crates/stages/src/stages/index_storage_history.rs +++ b/crates/stages/src/stages/index_storage_history.rs @@ -54,7 +54,7 @@ impl Stage for IndexStorageHistoryStage { tx.insert_storage_history_index(indices)?; info!(target: "sync::stages::index_storage_history", "Stage finished"); - Ok(ExecOutput { stage_progress: to_block, done: true }) + Ok(ExecOutput { stage_progress: to_block, done: to_block == previous_stage_progress }) } /// Unwind the stage.