Merge pull request #5294

77e9815d blockchain: do not try to pop the genesis block (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2019-04-01 17:22:51 +02:00
commit cabd848efa
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -645,6 +645,8 @@ block Blockchain::pop_block_from_blockchain()
block popped_block; block popped_block;
std::vector<transaction> popped_txs; std::vector<transaction> popped_txs;
CHECK_AND_ASSERT_THROW_MES(m_db->height() > 1, "Cannot pop the genesis block");
try try
{ {
m_db->pop_block(popped_block, popped_txs); m_db->pop_block(popped_block, popped_txs);