From e78cea74bd6c0ca88c9b7914dd53a29322357faf Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 11 Apr 2019 17:23:25 +0000 Subject: rpc: fix off by one in get_height --- src/rpc/core_rpc_server.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 71bfcc950..60feabba4 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -204,6 +204,7 @@ namespace cryptonote crypto::hash hash; m_core.get_blockchain_top(res.height, hash); + ++res.height; // block height to chain height res.hash = string_tools::pod_to_hex(hash); res.status = CORE_RPC_STATUS_OK; return true; -- cgit v1.2.3