mirror of
https://github.com/monero-project/monero.git
synced 2025-08-21 09:18:16 -04:00
node_rpc_proxy: factor a few RPC calls using get_info
Takes advantage of caching
This commit is contained in:
parent
a9b83f5a6e
commit
8c4db68ff7
4 changed files with 58 additions and 86 deletions
|
@ -4277,12 +4277,7 @@ uint64_t simple_wallet::get_daemon_blockchain_height(std::string& err)
|
|||
{
|
||||
throw std::runtime_error("simple_wallet null wallet");
|
||||
}
|
||||
|
||||
COMMAND_RPC_GET_HEIGHT::request req;
|
||||
COMMAND_RPC_GET_HEIGHT::response res = boost::value_initialized<COMMAND_RPC_GET_HEIGHT::response>();
|
||||
bool r = m_wallet->invoke_http_json("/getheight", req, res);
|
||||
err = interpret_rpc_response(r, res.status);
|
||||
return res.height;
|
||||
return m_wallet->get_daemon_blockchain_height(err);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
bool simple_wallet::show_blockchain_height(const std::vector<std::string>& args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue