diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-11 13:01:54 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-11 13:01:54 +0200 |
commit | 4a2cc76c8482adf7d15dd8f445adee52eada7281 (patch) | |
tree | c856f66fa68ee135787d6b9ae7c50726d39d2ef5 /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #5374 (diff) | |
parent | Add hash of top block to /getheight RPC (diff) | |
download | monero-4a2cc76c8482adf7d15dd8f445adee52eada7281.tar.xz |
Merge pull request #5376
c746f45d Add hash of top block to /getheight RPC (Howard Chu)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 2c51832a2..b540520c7 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -202,7 +202,9 @@ namespace cryptonote if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_HEIGHT>(invoke_http_mode::JON, "/getheight", req, res, r)) return r; - res.height = m_core.get_current_blockchain_height(); + crypto::hash hash; + m_core.get_blockchain_top(res.height, hash); + res.hash = string_tools::pod_to_hex(hash); res.status = CORE_RPC_STATUS_OK; return true; } |