aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-01 17:22:51 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-01 17:22:51 +0200
commitcabd848efa13483ee56183ca79dbae90de8e87fc (patch)
tree9078921873d190f5e861f816599cb4b6cb0840f8 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #5292 (diff)
parentblockchain: do not try to pop the genesis block (diff)
downloadmonero-cabd848efa13483ee56183ca79dbae90de8e87fc.tar.xz
Merge pull request #5294
77e9815d blockchain: do not try to pop the genesis block (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
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);