mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2025-01-26 19:22:57 -03:00
node_rpc_proxy: fix target height caching
This commit is contained in:
parent
e9f41e405f
commit
ec41006cad
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ void NodeRPCProxy::set_height(uint64_t h)
|
||||||
boost::optional<std::string> NodeRPCProxy::get_target_height(uint64_t &height) const
|
boost::optional<std::string> NodeRPCProxy::get_target_height(uint64_t &height) const
|
||||||
{
|
{
|
||||||
const time_t now = time(NULL);
|
const time_t now = time(NULL);
|
||||||
if (m_height == 0 || now >= m_height_time + 30) // re-cache every 30 seconds
|
if (m_target_height == 0 || now >= m_target_height_time + 30) // re-cache every 30 seconds
|
||||||
{
|
{
|
||||||
epee::json_rpc::request<cryptonote::COMMAND_RPC_GET_INFO::request> req_t = AUTO_VAL_INIT(req_t);
|
epee::json_rpc::request<cryptonote::COMMAND_RPC_GET_INFO::request> req_t = AUTO_VAL_INIT(req_t);
|
||||||
epee::json_rpc::response<cryptonote::COMMAND_RPC_GET_INFO::response, std::string> resp_t = AUTO_VAL_INIT(resp_t);
|
epee::json_rpc::response<cryptonote::COMMAND_RPC_GET_INFO::response, std::string> resp_t = AUTO_VAL_INIT(resp_t);
|
||||||
|
|
Loading…
Add table
Reference in a new issue