aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.h
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-04-07 14:06:29 +0900
committerstoffu <stoffu@protonmail.ch>2018-04-07 14:06:29 +0900
commitf82c10dc96af1c795ff5ca7085321316a820a714 (patch)
treec5541940eb59bdee4eeaf1b0a1d5610ad0f2ae3c /src/wallet/api/wallet_manager.h
parentMerge pull request #3434 (diff)
downloadmonero-f82c10dc96af1c795ff5ca7085321316a820a714.tar.xz
WalletManagerImpl: reuse existing connection to daemon instead of reconnectivng every time
Diffstat (limited to '')
-rw-r--r--src/wallet/api/wallet_manager.h16
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;
};