diff options
author | stoffu <stoffu@protonmail.ch> | 2018-04-07 14:06:29 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-04-19 09:33:37 +0900 |
commit | e561a0c3299af334bdd61c65f132e0ccac5f9c3b (patch) | |
tree | d500b93e07c445309600de70474132f3bb0e3225 /src/wallet/api/wallet_manager.h | |
parent | Merge pull request #3619 (diff) | |
download | monero-e561a0c3299af334bdd61c65f132e0ccac5f9c3b.tar.xz |
WalletManagerImpl: reuse existing connection to daemon instead of reconnectivng every time
Diffstat (limited to 'src/wallet/api/wallet_manager.h')
-rw-r--r-- | src/wallet/api/wallet_manager.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/wallet/api/wallet_manager.h b/src/wallet/api/wallet_manager.h index 409a6d499..26238b658 100644 --- a/src/wallet/api/wallet_manager.h +++ b/src/wallet/api/wallet_manager.h @@ -30,6 +30,7 @@ #include "wallet/api/wallet2_api.h" +#include "net/http_client.h" #include <string> namespace Monero { @@ -69,13 +70,13 @@ public: std::vector<std::string> findWallets(const std::string &path); std::string errorString() const; void setDaemonAddress(const std::string &address); - bool connected(uint32_t *version = NULL) const; - uint64_t blockchainHeight() const; - uint64_t blockchainTargetHeight() const; - uint64_t networkDifficulty() const; - double miningHashRate() const; - uint64_t blockTarget() const; - bool isMining() const; + bool connected(uint32_t *version = NULL); + uint64_t blockchainHeight(); + uint64_t blockchainTargetHeight(); + uint64_t networkDifficulty(); + double miningHashRate(); + uint64_t blockTarget(); + bool isMining(); bool startMining(const std::string &address, uint32_t threads = 1, bool background_mining = false, bool ignore_battery = true); bool stopMining(); std::string resolveOpenAlias(const std::string &address, bool &dnssec_valid) const; @@ -84,6 +85,7 @@ private: WalletManagerImpl() {} friend struct WalletManagerFactory; std::string m_daemonAddress; + epee::net_utils::http::http_simple_client m_http_client; std::string m_errorString; }; |