Merge pull request #10109

be79b83 Daemon RPC: fix on_getblockhash error return on too high height (j-berman)
This commit is contained in:
luigi1111 2025-10-07 15:18:26 -04:00
commit e0d83e0ebb
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -1852,6 +1852,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;