From 0f4ad90eacb9ab11c9dc320b12f5f94f276334eb Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Tue, 20 Nov 2018 15:09:42 -0800 Subject: [PATCH] do turnstile step only if blockchain is not syncing --- src/turnstile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/turnstile.cpp b/src/turnstile.cpp index 9ce13d5..c1fcb86 100644 --- a/src/turnstile.cpp +++ b/src/turnstile.cpp @@ -247,6 +247,10 @@ ProgressReport Turnstile::getPlanProgress() { } void Turnstile::executeMigrationStep() { + // Do a step only if not syncing, else wait for the blockchain to catch up + if (Settings::getInstance()->isSyncing()) + return; + auto plan = readMigrationPlan(); //qDebug() << QString("Executing step"); @@ -254,7 +258,7 @@ void Turnstile::executeMigrationStep() { // Get to the next unexecuted step auto fnIsEligibleItem = [&] (auto item) { - return item.status == TurnstileMigrationItemStatus::NotStarted || + return item.status == TurnstileMigrationItemStatus::NotStarted || item.status == TurnstileMigrationItemStatus::SentToT; };