mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #4750
e61062b6
use current height - 1 for top block height in err msgs (cryptochangements34)
This commit is contained in:
commit
23fc891555
1 changed files with 3 additions and 3 deletions
|
@ -1018,7 +1018,7 @@ namespace cryptonote
|
||||||
if(m_core.get_current_blockchain_height() <= h)
|
if(m_core.get_current_blockchain_height() <= h)
|
||||||
{
|
{
|
||||||
error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_HEIGHT;
|
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));
|
res = string_tools::pod_to_hex(m_core.get_block_id_by_height(h));
|
||||||
return true;
|
return true;
|
||||||
|
@ -1465,7 +1465,7 @@ namespace cryptonote
|
||||||
if(m_core.get_current_blockchain_height() <= req.height)
|
if(m_core.get_current_blockchain_height() <= req.height)
|
||||||
{
|
{
|
||||||
error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_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;
|
return false;
|
||||||
}
|
}
|
||||||
crypto::hash block_hash = m_core.get_block_id_by_height(req.height);
|
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)
|
if(m_core.get_current_blockchain_height() <= req.height)
|
||||||
{
|
{
|
||||||
error_resp.code = CORE_RPC_ERROR_CODE_TOO_BIG_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;
|
return false;
|
||||||
}
|
}
|
||||||
block_hash = m_core.get_block_id_by_height(req.height);
|
block_hash = m_core.get_block_id_by_height(req.height);
|
||||||
|
|
Loading…
Reference in a new issue