blockchain: do not try to pop the genesis block

This commit is contained in:
moneromooo-monero 2019-03-15 10:51:26 +00:00
parent 1d1a02e9f9
commit 77e9815db7
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -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);