mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 22:38:53 +00:00
Override for block hashing for block 202612
Since we need to fix tree_hash, but doing so would invalidate the block id for block 202612, this fix should check to see if we're trying to get the block id for 202612 (if its blob hash matches) and return the "old" block id, for backwards compatibility.
This commit is contained in:
parent
1d6372cccf
commit
a544603a7b
@ -628,6 +628,16 @@ namespace cryptonote
|
||||
//---------------------------------------------------------------
|
||||
bool get_block_hash(const block& b, crypto::hash& res)
|
||||
{
|
||||
// EXCEPTION FOR BLOCK 202612
|
||||
const std::string correct_blob_hash_202612 = "3a8a2b3a29b50fc86ff73dd087ea43c6f0d6b8f936c849194d5c84c737903966";
|
||||
const std::string existing_block_id_202612 = "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698";
|
||||
crypto::hash block_blob_hash = get_blob_hash(block_to_blob(b));
|
||||
|
||||
if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612)
|
||||
{
|
||||
res = string_tools::hex_to_pod(existing_block_id_202612);
|
||||
return true;
|
||||
}
|
||||
return get_object_hash(get_block_hashing_blob(b), res);
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user