aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorj-berman <justinberman@protonmail.com>2025-09-25 16:18:22 -0700
committerj-berman <justinberman@protonmail.com>2025-09-29 10:56:34 -0700
commitcfc41b3bdcc0f68187993252ddf8ffa0b3165b06 (patch)
tree971e2152598c6466daf76724f63195da526aa25d /src
parenta440e917906b92b74daa107e49fcb963266242fa (diff)
downloadmonzero-core-cfc41b3bdcc0f68187993252ddf8ffa0b3165b06.tar.gz
monzero-core-cfc41b3bdcc0f68187993252ddf8ffa0b3165b06.tar.xz
monzero-core-cfc41b3bdcc0f68187993252ddf8ffa0b3165b06.zip
Daemon RPC: fix on_getblockhash error return on too high height
Diffstat (limited to 'src')
-rw-r--r--src/rpc/core_rpc_server.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index d0c91876f..c84746975 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1812,6 +1812,7 @@ namespace cryptonote
{
error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_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);
+ return false;
}
res = string_tools::pod_to_hex(m_core.get_block_id_by_height(h));
return true;