block 202612 and 685498 fix

release-v0.4.0.1
jwinterm 6 years ago committed by wowario
parent 2c959a9b21
commit f6e53ad33c
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -903,7 +903,7 @@ void BlockchainDB::fixup()
"633cdedeb3b96ec4f234c670254c6f721e0b368d00b48c6b26759db7d62cf52d", "633cdedeb3b96ec4f234c670254c6f721e0b368d00b48c6b26759db7d62cf52d",
}; };
if (height() > 202612) if (height() > 202612 && strcmp(CRYPTONOTE_NAME, "monero")==0)
{ {
for (const auto &kis: key_images_202612) for (const auto &kis: key_images_202612)
{ {
@ -916,7 +916,7 @@ void BlockchainDB::fixup()
} }
} }
} }
if (height() > 685498) if (height() > 685498 && strcmp(CRYPTONOTE_NAME, "monero")==0)
{ {
for (const auto &kis: key_images_685498) for (const auto &kis: key_images_685498)
{ {

@ -889,7 +889,7 @@ namespace cryptonote
const std::string existing_block_id_202612 = "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698"; const std::string existing_block_id_202612 = "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698";
crypto::hash block_blob_hash = get_blob_hash(block_to_blob(b)); 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) if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612 && strcmp(CRYPTONOTE_NAME, "monero")==0)
{ {
string_tools::hex_to_pod(existing_block_id_202612, res); string_tools::hex_to_pod(existing_block_id_202612, res);
return true; return true;
@ -899,7 +899,7 @@ namespace cryptonote
if (hash_result) if (hash_result)
{ {
// make sure that we aren't looking at a block with the 202612 block id but not the correct blobdata // 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) if (string_tools::pod_to_hex(res) == existing_block_id_202612 && strcmp(CRYPTONOTE_NAME, "monero")==0)
{ {
LOG_ERROR("Block with block id for 202612 but incorrect block blob hash found!"); LOG_ERROR("Block with block id for 202612 but incorrect block blob hash found!");
res = null_hash; res = null_hash;

Loading…
Cancel
Save