diff options
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db.cpp b/src/db.cpp index 39a41894d7..670f0a876c 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -608,7 +608,7 @@ bool CTxDB::LoadBlockIndex() map<pair<unsigned int, unsigned int>, CBlockIndex*> mapBlockPos; for (CBlockIndex* pindex = pindexBest; pindex && pindex->pprev; pindex = pindex->pprev) { - if (pindex->nHeight < nBestHeight-nCheckDepth) + if (fRequestShutdown || pindex->nHeight < nBestHeight-nCheckDepth) break; CBlock block; if (!block.ReadFromDisk(pindex)) @@ -710,7 +710,7 @@ bool CTxDB::LoadBlockIndex() } } } - if (pindexFork) + if (pindexFork && !fRequestShutdown) { // Reorg back to the fork printf("LoadBlockIndex() : *** moving best chain pointer back to block %d\n", pindexFork->nHeight); |