blockchain: pop forked blocks only when DB is not read-only

pull/88/head
stoffu 6 years ago committed by moneromooo-monero
parent 1380b70e74
commit 233a1ead22
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -442,7 +442,7 @@ bool Blockchain::init(BlockchainDB* db, const network_type nettype, bool offline
m_db->block_txn_stop();
uint64_t num_popped_blocks = 0;
while (true)
while (!m_db->is_read_only())
{
const uint64_t top_height = m_db->height() - 1;
const crypto::hash top_id = m_db->top_block_hash();

Loading…
Cancel
Save