mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
added double-check for 202612 block id
if a new block has the same block id as 202612 but the wrong blobdata, this will tell the caller that the block id is actually null_hash rather than the 202612 block id.
This commit is contained in:
parent
115f9523fa
commit
9a16bb9936
1 changed files with 13 additions and 1 deletions
|
@ -638,7 +638,19 @@ namespace cryptonote
|
|||
string_tools::hex_to_pod(existing_block_id_202612, res);
|
||||
return true;
|
||||
}
|
||||
return get_object_hash(get_block_hashing_blob(b), res);
|
||||
bool hash_result = get_object_hash(get_block_hashing_blob(b), res);
|
||||
|
||||
if (hash_result)
|
||||
{
|
||||
// make sure that we aren't looking at a block with the 202612 block id but not the correct blobdata
|
||||
if (string_tools::pod_to_hex(res) == existing_block_id_202612)
|
||||
{
|
||||
LOG_ERROR("Block with block id for 202612 but incorrect block blob hash found!");
|
||||
res = null_hash;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return hash_result;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
crypto::hash get_block_hash(const block& b)
|
||||
|
|
Loading…
Reference in a new issue