diff options
| author | Riccardo Spagni <ric@spagni.net> | 2018-11-14 21:32:21 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2018-11-14 21:32:21 +0200 |
| commit | 23fc891555a6bd732d025e4d402ff5ac2466fdb3 (patch) | |
| tree | cc367886835698b5d772ee6c4ca26ae2946417d3 /src/rpc/core_rpc_server.cpp | |
| parent | ff347c98a1f195073a21b0feb199d36c7760610f (diff) | |
| parent | e61062b6f23cd27dba1da145c8590aff6fbf2f10 (diff) | |
| download | monzero-core-23fc891555a6bd732d025e4d402ff5ac2466fdb3.tar.gz monzero-core-23fc891555a6bd732d025e4d402ff5ac2466fdb3.tar.xz monzero-core-23fc891555a6bd732d025e4d402ff5ac2466fdb3.zip | |
Merge pull request #4750
e61062b6 use current height - 1 for top block height in err msgs (cryptochangements34)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
| -rw-r--r-- | src/rpc/core_rpc_server.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 4e0b2ed15..c2e71bef8 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1018,7 +1018,7 @@ namespace cryptonote if(m_core.get_current_blockchain_height() <= h) { error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_HEIGHT; - error_resp.message = std::string("Too big height: ") + std::to_string(h) + ", current blockchain height = " + std::to_string(m_core.get_current_blockchain_height()); + error_resp.message = std::string("Requested block height: ") + std::to_string(h) + " greater than current top block height: " + std::to_string(m_core.get_current_blockchain_height() - 1); } res = string_tools::pod_to_hex(m_core.get_block_id_by_height(h)); return true; @@ -1465,7 +1465,7 @@ namespace cryptonote if(m_core.get_current_blockchain_height() <= req.height) { error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_HEIGHT; - error_resp.message = std::string("Too big height: ") + std::to_string(req.height) + ", current blockchain height = " + std::to_string(m_core.get_current_blockchain_height()); + error_resp.message = std::string("Requested block height: ") + std::to_string(req.height) + " greater than current top block height: " + std::to_string(m_core.get_current_blockchain_height() - 1); return false; } crypto::hash block_hash = m_core.get_block_id_by_height(req.height); @@ -1510,7 +1510,7 @@ namespace cryptonote if(m_core.get_current_blockchain_height() <= req.height) { error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_HEIGHT; - error_resp.message = std::string("Too big height: ") + std::to_string(req.height) + ", current blockchain height = " + std::to_string(m_core.get_current_blockchain_height()); + error_resp.message = std::string("Requested block height: ") + std::to_string(req.height) + " greater than current top block height: " + std::to_string(m_core.get_current_blockchain_height() - 1); return false; } block_hash = m_core.get_block_id_by_height(req.height); |
