File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ int ClientModel::getNumBlocks() const
74
74
return chainActive.Height ();
75
75
}
76
76
77
- int ClientModel::getHeaderTipHeight ()
77
+ int ClientModel::getHeaderTipHeight () const
78
78
{
79
79
if (cachedBestHeaderHeight == -1 ) {
80
80
// make sure we initially populate the cache via a cs_main lock
@@ -87,7 +87,7 @@ int ClientModel::getHeaderTipHeight()
87
87
return cachedBestHeaderHeight;
88
88
}
89
89
90
- int64_t ClientModel::getHeaderTipTime ()
90
+ int64_t ClientModel::getHeaderTipTime () const
91
91
{
92
92
if (cachedBestHeaderTime == -1 ) {
93
93
LOCK (cs_main);
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ class ClientModel : public QObject
51
51
// ! Return number of connections, default is in- and outbound (total)
52
52
int getNumConnections (unsigned int flags = CONNECTIONS_ALL) const ;
53
53
int getNumBlocks () const ;
54
- int getHeaderTipHeight ();
55
- int64_t getHeaderTipTime ();
54
+ int getHeaderTipHeight () const ;
55
+ int64_t getHeaderTipTime () const ;
56
56
// ! Return number of transactions in the mempool
57
57
long getMempoolSize () const ;
58
58
// ! Return the dynamic memory usage of the mempool
@@ -82,8 +82,8 @@ class ClientModel : public QObject
82
82
QString dataDir () const ;
83
83
84
84
// caches for the best header
85
- std::atomic<int > cachedBestHeaderHeight;
86
- std::atomic<int64_t > cachedBestHeaderTime;
85
+ mutable std::atomic<int > cachedBestHeaderHeight;
86
+ mutable std::atomic<int64_t > cachedBestHeaderTime;
87
87
88
88
private:
89
89
OptionsModel *optionsModel;
You can’t perform that action at this time.
0 commit comments