From b18f0b10513b0455723518a634595b2f36d5ea25 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 13 Apr 2019 09:19:38 +0000 Subject: wallet: new --offline option It will avoid connecting to a daemon (so useful for cold signing using a RPC wallet), and not perform DNS queries. --- src/wallet/node_rpc_proxy.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/wallet/node_rpc_proxy.h') diff --git a/src/wallet/node_rpc_proxy.h b/src/wallet/node_rpc_proxy.h index 3630aec08..3b75c8b94 100644 --- a/src/wallet/node_rpc_proxy.h +++ b/src/wallet/node_rpc_proxy.h @@ -39,9 +39,10 @@ namespace tools class NodeRPCProxy { public: - NodeRPCProxy(epee::net_utils::http::http_simple_client &http_client, boost::mutex &mutex); + NodeRPCProxy(epee::net_utils::http::http_simple_client &http_client, boost::recursive_mutex &mutex); void invalidate(); + void set_offline(bool offline) { m_offline = offline; } boost::optional get_rpc_version(uint32_t &version) const; boost::optional get_height(uint64_t &height) const; @@ -56,7 +57,8 @@ private: boost::optional get_info() const; epee::net_utils::http::http_simple_client &m_http_client; - boost::mutex &m_daemon_rpc_mutex; + boost::recursive_mutex &m_daemon_rpc_mutex; + bool m_offline; mutable uint64_t m_height; mutable uint64_t m_earliest_height[256]; -- cgit v1.2.3