diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-01-19 20:51:59 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-01-19 20:47:04 +0100 |
commit | fa4d47814f298523aeb9a6658cc74fc46d316e33 (patch) | |
tree | b2a1f2e2df6e7d1b6a38eeb999cb3f0f9b4f9385 /src/qt/modaloverlay.cpp | |
parent | b25068697fdbfe3bc463b470f1295a44318c4467 (diff) |
qt: Use nPowTargetSpacing constant
Diffstat (limited to 'src/qt/modaloverlay.cpp')
-rw-r--r-- | src/qt/modaloverlay.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp index 89fb159956..4779ffa43f 100644 --- a/src/qt/modaloverlay.cpp +++ b/src/qt/modaloverlay.cpp @@ -7,6 +7,8 @@ #include "guiutil.h" +#include "chainparams.h" + #include <QResizeEvent> #include <QPropertyAnimation> @@ -125,11 +127,11 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri // estimate the number of headers left based on nPowTargetSpacing // and check if the gui is not aware of the the best header (happens rarely) - int estimateNumHeadersLeft = bestHeaderDate.secsTo(currentDate) / 600; + int estimateNumHeadersLeft = bestHeaderDate.secsTo(currentDate) / Params().GetConsensus().nPowTargetSpacing; bool hasBestHeader = bestHeaderHeight >= count; // show remaining number of blocks - if (estimateNumHeadersLeft < 24 && hasBestHeader) { + if (estimateNumHeadersLeft < HEADER_HEIGHT_DELTA_SYNC && hasBestHeader) { ui->numberOfBlocksLeft->setText(QString::number(bestHeaderHeight - count)); } else { ui->numberOfBlocksLeft->setText(tr("Unknown. Syncing Headers (%1)...").arg(bestHeaderHeight)); |