mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 13:49:35 +02:00
qt: Use nPowTargetSpacing constant
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user