aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/clientmodel.h')
-rw-r--r--src/qt/clientmodel.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 79175e0af4..ace77f5972 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -12,10 +12,10 @@
#include <memory>
class BanTableModel;
+class CBlockIndex;
class OptionsModel;
class PeerTableModel;
-
-class CBlockIndex;
+enum class SynchronizationState;
namespace interfaces {
class Handler;
@@ -56,6 +56,7 @@ public:
//! Return number of connections, default is in- and outbound (total)
int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const;
+ int getNumBlocks() const;
int getHeaderTipHeight() const;
int64_t getHeaderTipTime() const;
@@ -73,9 +74,10 @@ public:
bool getProxyInfo(std::string& ip_port) const;
- // caches for the best header
+ // caches for the best header, number of blocks
mutable std::atomic<int> cachedBestHeaderHeight;
mutable std::atomic<int64_t> cachedBestHeaderTime;
+ mutable std::atomic<int> m_cached_num_blocks{-1};
private:
interfaces::Node& m_node;
@@ -98,7 +100,7 @@ private:
Q_SIGNALS:
void numConnectionsChanged(int count);
- void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool header);
+ void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool header, SynchronizationState sync_state);
void mempoolSizeChanged(long count, size_t mempoolSizeInBytes);
void networkActiveChanged(bool networkActive);
void alertsChanged(const QString &warnings);