diff options
| author | Gavin Andresen <[email protected]> | 2013-10-14 20:39:00 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-14 20:39:00 -0700 |
| commit | b9beea6e9d0f789f11d249b040e549d535bdc295 (patch) | |
| tree | e87c3422b52b1f6d78b88b9cea756c1f3cb8d37b /src/qt/clientmodel.cpp | |
| parent | Merge pull request #2933 from sipa/leveldb113 (diff) | |
| parent | Refactor/encapsulate chain globals into a CChain class (diff) | |
| download | discoin-b9beea6e9d0f789f11d249b040e549d535bdc295.tar.xz discoin-b9beea6e9d0f789f11d249b040e549d535bdc295.zip | |
Merge pull request #3077 from sipa/chain
Refactor/encapsulate chain globals into a CChain class
Diffstat (limited to 'src/qt/clientmodel.cpp')
| -rw-r--r-- | src/qt/clientmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index b33f534f7..af96f11bf 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -42,7 +42,7 @@ int ClientModel::getNumConnections() const int ClientModel::getNumBlocks() const { - return nBestHeight; + return chainActive.Height(); } int ClientModel::getNumBlocksAtStartup() @@ -53,8 +53,8 @@ int ClientModel::getNumBlocksAtStartup() QDateTime ClientModel::getLastBlockDate() const { - if (pindexBest) - return QDateTime::fromTime_t(pindexBest->GetBlockTime()); + if (chainActive.Tip()) + return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime()); else if(!isTestNet()) return QDateTime::fromTime_t(1231006505); // Genesis block's time else @@ -63,7 +63,7 @@ QDateTime ClientModel::getLastBlockDate() const double ClientModel::getVerificationProgress() const { - return Checkpoints::GuessVerificationProgress(pindexBest); + return Checkpoints::GuessVerificationProgress(chainActive.Tip()); } void ClientModel::updateTimer() |