diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-01-14 22:41:14 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-01-14 22:41:14 +0000 |
| commit | feb499aaae496361f0b96a76ab614dca5258a5c1 (patch) | |
| tree | 0325227a5d79bfb8ca1d498af491a8e064ecd681 /src/cryptonote_core/blockchain.cpp | |
| parent | d98db4868ddd7727866b053eeeb8fe154363896c (diff) | |
| download | monzero-core-feb499aaae496361f0b96a76ab614dca5258a5c1.tar.gz monzero-core-feb499aaae496361f0b96a76ab614dca5258a5c1.tar.xz monzero-core-feb499aaae496361f0b96a76ab614dca5258a5c1.zip | |
core: check block version for alt chains too
This is incompatible with block version voting
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
| -rw-r--r-- | src/cryptonote_core/blockchain.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index de3af8e02..5230864ec 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1259,6 +1259,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); |
