Transactions-based verification progress
This commit is contained in:
@@ -572,8 +572,8 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
|
||||
progressBarLabel->setText(importText);
|
||||
progressBarLabel->setVisible(true);
|
||||
progressBar->setFormat(tr("%1 behind").arg(timeBehindText));
|
||||
progressBar->setMaximum(totalSecs);
|
||||
progressBar->setValue(totalSecs - secs);
|
||||
progressBar->setMaximum(1000000000);
|
||||
progressBar->setValue(clientModel->getVerificationProgress() * 1000000000.0 + 0.5);
|
||||
progressBar->setVisible(true);
|
||||
|
||||
tooltip = tr("Catching up...") + QString("<br>") + tooltip;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "alert.h"
|
||||
#include "main.h"
|
||||
#include "checkpoints.h"
|
||||
#include "ui_interface.h"
|
||||
|
||||
#include <QDateTime>
|
||||
@@ -54,6 +55,10 @@ QDateTime ClientModel::getLastBlockDate() const
|
||||
return QDateTime::fromTime_t(1231006505); // Genesis block's time
|
||||
}
|
||||
|
||||
double ClientModel::getVerificationProgress() const
|
||||
{
|
||||
return Checkpoints::GuessVerificationProgress(pindexBest);
|
||||
}
|
||||
|
||||
void ClientModel::updateTimer()
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
int getNumBlocks() const;
|
||||
int getNumBlocksAtStartup();
|
||||
|
||||
double getVerificationProgress() const;
|
||||
QDateTime getLastBlockDate() const;
|
||||
|
||||
//! Return true if client connected to testnet
|
||||
|
||||
Reference in New Issue
Block a user