mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 21:38:53 +00:00
blockchain: do not try to pop blocks down to the genesis block
This commit is contained in:
parent
4b51f9a34f
commit
35da33bea9
@ -624,6 +624,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…
Reference in New Issue
Block a user