mirror of
https://github.com/monero-project/monero.git
synced 2026-01-05 09:17:40 -08:00
Merge pull request #1577
feb499aa core: check block version for alt chains too (moneromooo-monero)
This commit is contained in:
@@ -1261,6 +1261,14 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id
|
||||
return false;
|
||||
}
|
||||
|
||||
// this is a cheap test
|
||||
if (!m_hardfork->check_for_height(b, block_height))
|
||||
{
|
||||
LOG_PRINT_L1("Block with id: " << id << std::endl << "has old version for height " << block_height);
|
||||
bvc.m_verifivation_failed = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//block is not related with head of main chain
|
||||
//first of all - look in alternative chains container
|
||||
auto it_prev = m_alternative_chains.find(b.prev_id);
|
||||
|
||||
Reference in New Issue
Block a user