aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index d307473102..08abaa6b49 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -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());