The synchronization progress bar now compares the amount of total blocks to amount of blocks downloaded at application start-up. Could be probably implemented better.
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
9b9e2f1748
commit
78b3bf56f7
@@ -18,6 +18,8 @@ ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
|
||||
QTimer *timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
|
||||
timer->start(MODEL_UPDATE_DELAY);
|
||||
|
||||
numBlocksAtStartup = -1;
|
||||
}
|
||||
|
||||
int ClientModel::getNumConnections() const
|
||||
@@ -30,6 +32,12 @@ int ClientModel::getNumBlocks() const
|
||||
return nBestHeight;
|
||||
}
|
||||
|
||||
int ClientModel::getNumBlocksAtStartup()
|
||||
{
|
||||
if (numBlocksAtStartup == -1) numBlocksAtStartup = getNumBlocks();
|
||||
return numBlocksAtStartup;
|
||||
}
|
||||
|
||||
QDateTime ClientModel::getLastBlockDate() const
|
||||
{
|
||||
return QDateTime::fromTime_t(pindexBest->GetBlockTime());
|
||||
|
||||
Reference in New Issue
Block a user