aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/api/wallet.h')
-rw-r--r--src/wallet/api/wallet.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index 11880d555..c399e3ab6 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -75,9 +75,12 @@ public:
bool trustedDaemon() const;
uint64_t balance() const;
uint64_t unlockedBalance() const;
+ uint64_t blockChainHeight() const;
+ uint64_t daemonBlockChainHeight() const;
+ uint64_t daemonBlockChainTargetHeight() const;
bool refresh();
void refreshAsync();
- void setAutoRefreshInterval(int seconds);
+ void setAutoRefreshInterval(int millis);
int autoRefreshInterval() const;
@@ -99,14 +102,16 @@ private:
void startRefresh();
void stopRefresh();
void pauseRefresh();
+ bool isNewWallet() const;
+ void doInit(const std::string &daemon_address, uint64_t upper_transaction_size_limit);
private:
friend class PendingTransactionImpl;
friend class TransactionHistoryImpl;
tools::wallet2 * m_wallet;
- std::atomic<int> m_status;
- std::string m_errorString;
+ mutable std::atomic<int> m_status;
+ mutable std::string m_errorString;
std::string m_password;
TransactionHistoryImpl * m_history;
bool m_trustedDaemon;
@@ -116,7 +121,7 @@ private:
// multi-threaded refresh stuff
std::atomic<bool> m_refreshEnabled;
std::atomic<bool> m_refreshThreadDone;
- std::atomic<int> m_refreshIntervalSeconds;
+ std::atomic<int> m_refreshIntervalMillis;
// synchronizing refresh loop;
boost::mutex m_refreshMutex;
@@ -124,7 +129,10 @@ private:
boost::mutex m_refreshMutex2;
boost::condition_variable m_refreshCV;
boost::thread m_refreshThread;
-
+ // 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;
};