blockchain: do not try to pop blocks down to the genesis block

pull/202/head
moneromooo-monero 5 years ago committed by wowario
parent af1a741699
commit 19d4cbefe8
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -579,6 +579,9 @@ void Blockchain::pop_blocks(uint64_t nblocks)
try
{
const uint64_t blockchain_height = m_db->height();
if (blockchain_height > 0)
nblocks = std::min(nblocks, blockchain_height - 1);
for (i=0; i < nblocks; ++i)
{
pop_block_from_blockchain();

Loading…
Cancel
Save