diff options
| author | Jonas Schnelli <[email protected]> | 2016-09-13 16:36:24 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2016-09-13 17:57:25 +0200 |
| commit | d8b062ef5eea3addff00a09bad1dab162452b4b5 (patch) | |
| tree | bc4a075d2557f3ea653ffc6b07540fc7653cce97 /src/qt/bitcoingui.cpp | |
| parent | [Qt] add out-of-sync modal info layer (diff) | |
| download | discoin-d8b062ef5eea3addff00a09bad1dab162452b4b5.tar.xz discoin-d8b062ef5eea3addff00a09bad1dab162452b4b5.zip | |
[Qt] only update "amount of blocks left" when the header chain is in-sync
Diffstat (limited to 'src/qt/bitcoingui.cpp')
| -rw-r--r-- | src/qt/bitcoingui.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 628d35b5e..c184745db 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -500,7 +500,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) setTrayIconVisible(optionsModel->getHideTrayIcon()); } - modalOverlay->setKnownBestHeight(clientModel->getHeaderHeight()); + modalOverlay->setKnownBestHeight(clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(clientModel->getHeaderTipTime())); } else { // Disable possibility to show main window via action toggleHideAction->setEnabled(false); @@ -718,7 +718,10 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer if (modalOverlay) { if (header) - modalOverlay->setKnownBestHeight(count); + { + /* use clientmodels getHeaderTipHeight and getHeaderTipTime because the NotifyHeaderTip signal does not fire when updating the best header */ + modalOverlay->setKnownBestHeight(clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(clientModel->getHeaderTipTime())); + } else modalOverlay->tipUpdate(count, blockDate, nVerificationProgress); } |