aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 12647e568a..5bd0528202 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -613,7 +613,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))
@@ -715,7 +715,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);