aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <gmaxwell@gmail.com>2012-05-08 12:37:27 -0700
committerGregory Maxwell <gmaxwell@gmail.com>2012-05-08 12:37:27 -0700
commitf1ae31d8af8e03acbd224d486542b4409acf01ff (patch)
treec8869fb430c7b33b235e870e1066c9edd47fc3d5 /src/db.cpp
parentfa8cc47c4f70bd3e2b0f4bc5076aba40597b12ec (diff)
parent1d740055daa6e1668f047186d208b0693c6b21ba (diff)
Merge pull request #883 from sipa/loadblock
Add -loadblock to load from an external blk000?.dat file
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);