aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-04-20 09:51:41 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-04-20 09:51:41 +0200
commit928d4a9ac596db35bf3b8a0c8857cd6e7f87aa2a (patch)
treea17580e8e138707cedf3762fcd0f4004ea995f10 /src/qt/clientmodel.cpp
parent610a91719c89f9b52f2ae4a5bd039688fe11ffd7 (diff)
Set both time/height header caches at the same time
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index cbc6ca1296..20d4687971 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -82,6 +82,7 @@ int ClientModel::getHeaderTipHeight() const
LOCK(cs_main);
if (pindexBestHeader) {
cachedBestHeaderHeight = pindexBestHeader->nHeight;
+ cachedBestHeaderTime = pindexBestHeader->GetBlockTime();
}
}
return cachedBestHeaderHeight;
@@ -92,6 +93,7 @@ int64_t ClientModel::getHeaderTipTime() const
if (cachedBestHeaderTime == -1) {
LOCK(cs_main);
if (pindexBestHeader) {
+ cachedBestHeaderHeight = pindexBestHeader->nHeight;
cachedBestHeaderTime = pindexBestHeader->GetBlockTime();
}
}