diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-09-29 22:13:49 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-09-29 22:13:49 +0200 |
commit | f195a447ccf1a26eba8aaf7560e6bfc902db6f77 (patch) | |
tree | ee36fd1a595b1d0df170f805e2a0b6a4d2d90019 /src/wallet/api/wallet.h | |
parent | Merge pull request #1137 (diff) | |
parent | wallet2: wallet2::get_daemon_blockchain_height() clean error message on (diff) | |
download | monero-f195a447ccf1a26eba8aaf7560e6bfc902db6f77.tar.xz |
Merge pull request #1136
2dacb19 wallet2: wallet2::get_daemon_blockchain_height() clean error message on success (Ilya Kitaev)
25e5efc libwallet_api: Wallet::setAutoRefreshInterval sanity check (Ilya Kitaev)
a668820 libwallet_api: explicitly return 0 in Wallet::daemonBlockChainHeight() on error (Ilya Kitaev)
aef92f2 libwallet_api: tests: fixed WalletCallbackReceived test (Ilya Kitaev)
15c0882 libwallet_api: tests: test fixed according implementation (Ilya Kitaev)
a7882da libwallet_api: tests: compilation errors fixed (Ilya Kitaev)
cda4cb9 formatting: 2-spaces indentation (Ilya Kitaev)
545a48f formatting: 2-spaces indentation (Ilya Kitaev)
3079c57 wallet2_api: milliseconds resolution for auto-refresh interval (Ilya Kitaev)
7b4a85b wallet2_api: added Wallet::daemonBlockChainHeight() (Ilya Kitaev)
9de3ec3 libwallet_api: Wallet::blockChainHeight, WalletListener::newBlock (Ilya Kitaev)
Diffstat (limited to 'src/wallet/api/wallet.h')
-rw-r--r-- | src/wallet/api/wallet.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 11880d555..d97a8f3b3 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -75,9 +75,11 @@ public: bool trustedDaemon() const; uint64_t balance() const; uint64_t unlockedBalance() const; + uint64_t blockChainHeight() const; + uint64_t daemonBlockChainHeight() const; bool refresh(); void refreshAsync(); - void setAutoRefreshInterval(int seconds); + void setAutoRefreshInterval(int millis); int autoRefreshInterval() const; @@ -105,8 +107,8 @@ private: 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 +118,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; |