Skip to content

Commit

Permalink
rpc: fix off by one in get_height
Browse files Browse the repository at this point in the history
  • Loading branch information
moneromooo-monero committed Apr 11, 2019
1 parent 9c77dbf commit e78cea7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rpc/core_rpc_server.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit e78cea7

Please sign in to comment.