rpc: fix off by one in get_height

This commit is contained in:
moneromooo-monero 2019-04-11 17:23:25 +00:00
parent 9c77dbf376
commit e78cea74bd
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ namespace cryptonote
crypto::hash hash; crypto::hash hash;
m_core.get_blockchain_top(res.height, 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.hash = string_tools::pod_to_hex(hash);
res.status = CORE_RPC_STATUS_OK; res.status = CORE_RPC_STATUS_OK;
return true; return true;