mirror of
https://github.com/monero-project/monero.git
synced 2025-01-09 12:29:53 +00:00
Blockchain: fix temp fails causing alt blocks to be permanently invalid
This commit is contained in:
parent
24ccaba6ef
commit
f0a574c3a9
1 changed files with 0 additions and 6 deletions
|
@ -1210,12 +1210,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<block_extended_info>
|
||||||
// just the latter (because the rollback was done above).
|
// just the latter (because the rollback was done above).
|
||||||
rollback_blockchain_switching(disconnected_chain, split_height);
|
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);
|
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);
|
m_db->remove_alt_block(blkid);
|
||||||
alt_ch_iter++;
|
alt_ch_iter++;
|
||||||
|
|
||||||
|
@ -1223,7 +1218,6 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<block_extended_info>
|
||||||
{
|
{
|
||||||
const auto &bei = *alt_ch_to_orph_iter++;
|
const auto &bei = *alt_ch_to_orph_iter++;
|
||||||
const crypto::hash blkid = cryptonote::get_block_hash(bei.bl);
|
const crypto::hash blkid = cryptonote::get_block_hash(bei.bl);
|
||||||
add_block_as_invalid(bei, blkid);
|
|
||||||
m_db->remove_alt_block(blkid);
|
m_db->remove_alt_block(blkid);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue