From 8c7ea6fc34b10a0db875edeca482d37a35b11fde Mon Sep 17 00:00:00 2001 From: Barry Deeney Date: Tue, 26 Nov 2019 05:42:23 +0800 Subject: [PATCH] Fixed freezing GUI on reindex (#638) --- src/qt/clientmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index b00bd02fe..97b5fdcf9 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -302,7 +302,7 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, const CB clientmodel->cachedBestHeaderTime = blockTime; } // if we are in-sync or if we notify a header update, update the UI regardless of last update time - if (fHeader || !initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) { + if ((fHeader && !fReindex) || !initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) { //pass an async signal to the UI thread QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection, Q_ARG(int, height),