165{
167
169 if (result)
170 return result;
171
172 if (m_offline)
173 return boost::optional<std::string>("offline");
174 if (m_dynamic_base_fee_estimate_cached_height !=
height || m_dynamic_base_fee_estimate_grace_blocks != grace_blocks)
175 {
178
179 m_daemon_rpc_mutex.lock();
180 req_t.grace_blocks = grace_blocks;
182 m_daemon_rpc_mutex.unlock();
183 CHECK_AND_ASSERT_MES(r, std::string(
"Failed to connect to daemon"),
"Failed to connect to daemon");
186 m_dynamic_base_fee_estimate = resp_t.fee;
187 m_dynamic_base_fee_estimate_cached_height =
height;
188 m_dynamic_base_fee_estimate_grace_blocks = grace_blocks;
189 m_fee_quantization_mask = resp_t.quantization_mask;
190 }
191
192 fee = m_dynamic_base_fee_estimate;
193 return boost::optional<std::string>();
194}
#define CORE_RPC_STATUS_OK
#define CORE_RPC_STATUS_BUSY
#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)
bool invoke_http_json_rpc(const boost::string_ref uri, std::string method_name, const t_request &out_struct, t_response &result_struct, t_transport &transport, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref http_method="GET", const std::string &req_id="0")
unsigned __int64 uint64_t
epee::misc_utils::struct_init< response_t > response
epee::misc_utils::struct_init< request_t > request