From 9de3ec3e2a48a4695b77c66add93c2fbf42affc2 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Fri, 23 Sep 2016 22:36:37 +0300 Subject: libwallet_api: Wallet::blockChainHeight, WalletListener::newBlock --- src/wallet/api/wallet.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/api/wallet.h') diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 11880d555..1a34a04fd 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -75,6 +75,7 @@ public: bool trustedDaemon() const; uint64_t balance() const; uint64_t unlockedBalance() const; + uint64_t blockChainHeight() const; bool refresh(); void refreshAsync(); void setAutoRefreshInterval(int seconds); -- cgit v1.2.3 From 7b4a85b309aa0fb864d63a2fd6f1ae062aaa71dd Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Mon, 26 Sep 2016 21:35:00 +0300 Subject: wallet2_api: added Wallet::daemonBlockChainHeight() --- src/wallet/api/wallet.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/wallet/api/wallet.h') diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 1a34a04fd..03801edac 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -76,6 +76,7 @@ public: uint64_t balance() const; uint64_t unlockedBalance() const; uint64_t blockChainHeight() const; + uint64_t daemonBlockChainHeight() const; bool refresh(); void refreshAsync(); void setAutoRefreshInterval(int seconds); @@ -106,8 +107,8 @@ private: friend class TransactionHistoryImpl; tools::wallet2 * m_wallet; - std::atomic m_status; - std::string m_errorString; + mutable std::atomic m_status; + mutable std::string m_errorString; std::string m_password; TransactionHistoryImpl * m_history; bool m_trustedDaemon; -- cgit v1.2.3 From 3079c5756be459af57c8c866b339b4b98c1da1f2 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Mon, 26 Sep 2016 22:50:10 +0300 Subject: wallet2_api: milliseconds resolution for auto-refresh interval --- src/wallet/api/wallet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wallet/api/wallet.h') diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 03801edac..d97a8f3b3 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -79,7 +79,7 @@ public: uint64_t daemonBlockChainHeight() const; bool refresh(); void refreshAsync(); - void setAutoRefreshInterval(int seconds); + void setAutoRefreshInterval(int millis); int autoRefreshInterval() const; @@ -118,7 +118,7 @@ private: // multi-threaded refresh stuff std::atomic m_refreshEnabled; std::atomic m_refreshThreadDone; - std::atomic m_refreshIntervalSeconds; + std::atomic m_refreshIntervalMillis; // synchronizing refresh loop; boost::mutex m_refreshMutex; -- cgit v1.2.3