diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-01 17:22:51 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-01 17:22:51 +0200 |
commit | cabd848efa13483ee56183ca79dbae90de8e87fc (patch) | |
tree | 9078921873d190f5e861f816599cb4b6cb0840f8 /src | |
parent | Merge pull request #5292 (diff) | |
parent | blockchain: do not try to pop the genesis block (diff) | |
download | monero-cabd848efa13483ee56183ca79dbae90de8e87fc.tar.xz |
Merge pull request #5294
77e9815d blockchain: do not try to pop the genesis block (moneromooo-monero)
Diffstat (limited to 'src')
-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 c6c79ff6e..263227148 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); |