From 8c4db68ff71537759aac5dca50d5d8d1c6032d37 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 30 Jun 2018 22:06:09 +0100 Subject: node_rpc_proxy: factor a few RPC calls using get_info Takes advantage of caching --- src/simplewallet/simplewallet.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/simplewallet/simplewallet.cpp') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 0b2d072d6..08357ec88 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -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(); - 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& args) -- cgit v1.2.3