aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-02-06 16:59:50 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-02-06 17:00:30 +0100
commit12a910c9435c1e5437984061e11c7d00523e37c5 (patch)
treee91fba2ae9991ed91d8072a013546bb3c57d9eb2 /src/qt/clientmodel.cpp
parentddae781a0cc1c800ff41a3534e8e3b22e3bdf50d (diff)
parente8db6b8044424a6fbb4b0a80acffc8c7fbf6be8b (diff)
Merge #15091: GUI: fix model overlay header sync
e8db6b8044424a6fbb4b0a80acffc8c7fbf6be8b Qt: Fix update headers-count (Jonas Schnelli) 7bb45e4b7a71e0ff0e2bbeba5367022758efa5d4 Qt: update header count regardless of update delay (Jonas Schnelli) Pull request description: Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update. The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks). This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels. Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 30d9e977b8..27b4c182f9 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -237,8 +237,8 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, int heig
clientmodel->cachedBestHeaderHeight = height;
clientmodel->cachedBestHeaderTime = blockTime;
}
- // if we are in-sync, update the UI regardless of last update time
- if (!initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) {
+ // 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) {
//pass an async signal to the UI thread
QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection,
Q_ARG(int, height),