diff options
| author | Howard Chu <hyc@symas.com> | 2019-04-01 01:02:58 +0100 |
|---|---|---|
| committer | Howard Chu <hyc@symas.com> | 2019-04-01 01:02:58 +0100 |
| commit | c746f45d3e12027b99e4ec010fa465f0bd01f198 (patch) | |
| tree | 7e148cc0ebdb78c2664aa9a6f4240ae3f4215bd1 /src/rpc/core_rpc_server.cpp | |
| parent | 423d3bb86b7bd6f99e70e0f05c45fae97cd68cd9 (diff) | |
| download | monzero-core-c746f45d3e12027b99e4ec010fa465f0bd01f198.tar.gz monzero-core-c746f45d3e12027b99e4ec010fa465f0bd01f198.tar.xz monzero-core-c746f45d3e12027b99e4ec010fa465f0bd01f198.zip | |
Add hash of top block to /getheight RPC
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 56b0361a7..111b1c324 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -193,7 +193,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; } |
