aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/wallet/api/wallet.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index 5046fbf0f..d245a78d0 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -107,14 +107,15 @@ public:
virtual std::string getTxKey(const std::string &txid) const;
virtual std::string signMessage(const std::string &message);
virtual bool verifySignedMessage(const std::string &message, const std::string &address, const std::string &signature) const;
+ virtual void startRefresh();
+ virtual void pauseRefresh();
private:
void clearStatus();
void refreshThreadFunc();
void doRefresh();
- void startRefresh();
+ bool daemonSynced() const;
void stopRefresh();
- void pauseRefresh();
bool isNewWallet() const;
void doInit(const std::string &daemon_address, uint64_t upper_transaction_size_limit);
@@ -148,9 +149,11 @@ private:
// flag indicating wallet is recovering from seed
// so it shouldn't be considered as new and pull blocks (slow-refresh)
// instead of pulling hashes (fast-refresh)
- bool m_recoveringFromSeed;
+ std::atomic<bool> m_recoveringFromSeed;
std::atomic<bool> m_synchronized;
- bool m_rebuildWalletCache;
+ std::atomic<bool> m_rebuildWalletCache;
+ // cache connection status to avoid unnecessary RPC calls
+ mutable std::atomic<bool> m_is_connected;
};