aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-15 10:51:26 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-15 10:51:48 +0000
commit77e9815db7c5cea2649b28ef0ba3eefd106af014 (patch)
tree871ee6345b7c81896c0e5ccf1b7542ab7b384e86 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #5258 (diff)
downloadmonero-77e9815db7c5cea2649b28ef0ba3eefd106af014.tar.xz
blockchain: do not try to pop the genesis block
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 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);