diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-15 10:51:26 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-15 10:51:48 +0000 |
commit | 77e9815db7c5cea2649b28ef0ba3eefd106af014 (patch) | |
tree | 871ee6345b7c81896c0e5ccf1b7542ab7b384e86 | |
parent | Merge pull request #5258 (diff) | |
download | monero-77e9815db7c5cea2649b28ef0ba3eefd106af014.tar.xz |
blockchain: do not try to pop the genesis block
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 471edea99..cbf39cf07 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -645,6 +645,8 @@ block Blockchain::pop_block_from_blockchain() block popped_block; std::vector<transaction> popped_txs; + CHECK_AND_ASSERT_THROW_MES(m_db->height() > 1, "Cannot pop the genesis block"); + try { m_db->pop_block(popped_block, popped_txs); |