aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-01-19 20:51:59 +0100
committerMarcoFalke <falke.marco@gmail.com>2017-01-19 20:47:04 +0100
commitfa4d47814f298523aeb9a6658cc74fc46d316e33 (patch)
treeb2a1f2e2df6e7d1b6a38eeb999cb3f0f9b4f9385 /src/qt/bitcoingui.cpp
parentb25068697fdbfe3bc463b470f1295a44318c4467 (diff)
qt: Use nPowTargetSpacing constant
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index b86437cede..f86b09644b 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -31,6 +31,7 @@
#include "macdockiconhandler.h"
#endif
+#include "chainparams.h"
#include "init.h"
#include "ui_interface.h"
#include "util.h"
@@ -752,8 +753,8 @@ void BitcoinGUI::updateHeadersSyncProgressLabel()
{
int64_t headersTipTime = clientModel->getHeaderTipTime();
int headersTipHeight = clientModel->getHeaderTipHeight();
- int estHeadersLeft = (GetTime() - headersTipTime)/600;
- if (estHeadersLeft > REQ_HEADER_HEIGHT_DELTA_SYNC)
+ int estHeadersLeft = (GetTime() - headersTipTime) / Params().GetConsensus().nPowTargetSpacing;
+ if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
progressBarLabel->setText(tr("Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1)));
}