diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-06-20 14:39:09 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-20 14:39:09 -0500 |
commit | 9eb51887b0b0f71191d1887e6fb96d5dda655a1a (patch) | |
tree | d41447943119973ecbcdebe4a1543a09d76159ce | |
parent | Merge pull request #3904 (diff) | |
parent | blockchain: pop forked blocks only when DB is not read-only (diff) | |
download | monero-9eb51887b0b0f71191d1887e6fb96d5dda655a1a.tar.xz |
Merge pull request #3919
ace2eda blockchain: pop forked blocks only when DB is not read-only (stoffu)
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 0448551c4..ad604deef 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -444,7 +444,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(); |