From 7fdaf61d41731fb6f612031227ee8fbffcef9e05 Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Thu, 11 Jul 2024 00:43:38 -0500 Subject: [PATCH] Blockchain: fix temp fails causing alt blocks to be permanently invalid --- src/cryptonote_core/blockchain.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 3a7575119..cc1a01ad7 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1209,12 +1209,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::list // just the latter (because the rollback was done above). rollback_blockchain_switching(disconnected_chain, split_height); - // FIXME: Why do we keep invalid blocks around? Possibly in case we hear - // about them again so we can immediately dismiss them, but needs some - // looking into. const crypto::hash blkid = cryptonote::get_block_hash(bei.bl); - add_block_as_invalid(bei, blkid); - MERROR("The block was inserted as invalid while connecting new alternative chain, block_id: " << blkid); m_db->remove_alt_block(blkid); alt_ch_iter++; @@ -1222,7 +1217,6 @@ bool Blockchain::switch_to_alternative_blockchain(std::list { const auto &bei = *alt_ch_to_orph_iter++; const crypto::hash blkid = cryptonote::get_block_hash(bei.bl); - add_block_as_invalid(bei, blkid); m_db->remove_alt_block(blkid); } return false;