diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-09-13 16:36:24 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-09-13 17:57:25 +0200 |
commit | d8b062ef5eea3addff00a09bad1dab162452b4b5 (patch) | |
tree | bc4a075d2557f3ea653ffc6b07540fc7653cce97 /src/qt/clientmodel.cpp | |
parent | e3245b43d5c6fc984e8c60495f6db54f85d64368 (diff) |
[Qt] only update "amount of blocks left" when the header chain is in-sync
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r-- | src/qt/clientmodel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index e3240b95a2..fb0cce59cc 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -68,7 +68,7 @@ int ClientModel::getNumBlocks() const return chainActive.Height(); } -int ClientModel::getHeaderHeight() const +int ClientModel::getHeaderTipHeight() const { LOCK(cs_main); if (!pindexBestHeader) @@ -76,6 +76,14 @@ int ClientModel::getHeaderHeight() const return pindexBestHeader->nHeight; } +int64_t ClientModel::getHeaderTipTime() const +{ + LOCK(cs_main); + if (!pindexBestHeader) + return 0; + return pindexBestHeader->GetBlockTime(); +} + quint64 ClientModel::getTotalBytesRecv() const { return CNode::GetTotalBytesRecv(); |