From f1307bbd7bbdd331ed6b7be42411bcd2ecd56b5a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 2 Aug 2017 14:43:47 +0100 Subject: node_rpc_proxy: add a proxy for target height --- src/wallet/node_rpc_proxy.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 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 02d1d8d93..fb288189a 100644 --- a/src/wallet/node_rpc_proxy.h +++ b/src/wallet/node_rpc_proxy.h @@ -43,23 +43,26 @@ public: void invalidate(); - boost::optional get_rpc_version(uint32_t &version); - boost::optional get_height(uint64_t &height); + boost::optional get_rpc_version(uint32_t &version) const; + boost::optional get_height(uint64_t &height) const; void set_height(uint64_t h); - boost::optional get_earliest_height(uint8_t version, uint64_t &earliest_height); - boost::optional get_dynamic_per_kb_fee_estimate(uint64_t grace_blocks, uint64_t &fee); + boost::optional get_target_height(uint64_t &height) const; + boost::optional get_earliest_height(uint8_t version, uint64_t &earliest_height) const; + boost::optional get_dynamic_per_kb_fee_estimate(uint64_t grace_blocks, uint64_t &fee) const; private: epee::net_utils::http::http_simple_client &m_http_client; boost::mutex &m_daemon_rpc_mutex; - uint64_t m_height; - time_t m_height_time; - uint64_t m_earliest_height[256]; - uint64_t m_dynamic_per_kb_fee_estimate; - uint64_t m_dynamic_per_kb_fee_estimate_cached_height; - uint64_t m_dynamic_per_kb_fee_estimate_grace_blocks; - uint32_t m_rpc_version; + 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; }; } -- cgit v1.2.3