From 2f867203b0c7a4438ce484be4cfa2b29dbf1abf0 Mon Sep 17 00:00:00 2001 From: furszy Date: Thu, 23 Jan 2020 19:31:16 -0300 Subject: Added best block hash to the NotifyHeaderTip and NotifyBlockTip signals. [ClientModel] best header/block hash cached. --- src/qt/walletmodel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/qt/walletmodel.h') diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 23232ec66b..59470c002d 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -144,8 +144,8 @@ public: interfaces::Node& node() const { return m_node; } interfaces::Wallet& wallet() const { return *m_wallet; } + ClientModel& clientModel() const { return *m_client_model; } void setClientModel(ClientModel* client_model); - int getNumBlocks() const { return cachedNumBlocks; } QString getWalletName() const; QString getDisplayName() const; @@ -179,9 +179,11 @@ private: // Cache some values to be able to detect changes interfaces::WalletBalances m_cached_balances; EncryptionStatus cachedEncryptionStatus; - int cachedNumBlocks; QTimer* timer; + // Block hash denoting when the last balance update was done. + uint256 m_cached_last_update_tip{}; + void subscribeToCoreSignals(); void unsubscribeFromCoreSignals(); void checkBalanceChanged(const interfaces::WalletBalances& new_balances); -- cgit v1.2.3