diff options
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r-- | src/qt/walletmodel.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 07004b7c6b..38e8a14556 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -144,7 +144,8 @@ public: interfaces::Node& node() const { return m_node; } interfaces::Wallet& wallet() const { return *m_wallet; } - ClientModel& clientModel() const { return m_client_model; } + ClientModel& clientModel() const { return *m_client_model; } + void setClientModel(ClientModel* client_model); QString getWalletName() const; QString getDisplayName() const; @@ -152,6 +153,8 @@ public: bool isMultiwallet(); AddressTableModel* getAddressTableModel() const { return addressTableModel; } + + void refresh(bool pk_hash_only = false); private: std::unique_ptr<interfaces::Wallet> m_wallet; std::unique_ptr<interfaces::Handler> m_handler_unload; @@ -161,7 +164,7 @@ private: std::unique_ptr<interfaces::Handler> m_handler_show_progress; std::unique_ptr<interfaces::Handler> m_handler_watch_only_changed; std::unique_ptr<interfaces::Handler> m_handler_can_get_addrs_changed; - ClientModel& m_client_model; + ClientModel* m_client_model; interfaces::Node& m_node; bool fHaveWatchOnly; @@ -178,7 +181,10 @@ 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(); |