aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/node_rpc_proxy.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-30 22:06:09 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-02 17:59:44 +0100
commit8c4db68ff71537759aac5dca50d5d8d1c6032d37 (patch)
treed6b5c3abfad688b72500b0de7f6f48d761eb362a /src/wallet/node_rpc_proxy.h
parentMerge pull request #4067 (diff)
downloadmonero-8c4db68ff71537759aac5dca50d5d8d1c6032d37.tar.xz
node_rpc_proxy: factor a few RPC calls using get_info
Takes advantage of caching
Diffstat (limited to 'src/wallet/node_rpc_proxy.h')
-rw-r--r--src/wallet/node_rpc_proxy.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/node_rpc_proxy.h b/src/wallet/node_rpc_proxy.h
index 1b183212d..8a65884f7 100644
--- a/src/wallet/node_rpc_proxy.h
+++ b/src/wallet/node_rpc_proxy.h
@@ -47,22 +47,25 @@ public:
boost::optional<std::string> get_height(uint64_t &height) const;
void set_height(uint64_t h);
boost::optional<std::string> get_target_height(uint64_t &height) const;
+ boost::optional<std::string> get_block_size_limit(uint64_t &block_size_limit) const;
boost::optional<std::string> get_earliest_height(uint8_t version, uint64_t &earliest_height) const;
boost::optional<std::string> get_dynamic_per_kb_fee_estimate(uint64_t grace_blocks, uint64_t &fee) const;
private:
+ boost::optional<std::string> get_info() const;
+
epee::net_utils::http::http_simple_client &m_http_client;
boost::mutex &m_daemon_rpc_mutex;
mutable uint64_t m_height;
- mutable time_t m_height_time;
mutable uint64_t m_earliest_height[256];
mutable uint64_t m_dynamic_per_kb_fee_estimate;
mutable uint64_t m_dynamic_per_kb_fee_estimate_cached_height;
mutable uint64_t m_dynamic_per_kb_fee_estimate_grace_blocks;
mutable uint32_t m_rpc_version;
mutable uint64_t m_target_height;
- mutable time_t m_target_height_time;
+ mutable uint64_t m_block_size_limit;
+ mutable time_t m_get_info_time;
};
}