diff options
author | Gregory Maxwell <gmaxwell@gmail.com> | 2012-05-08 12:37:27 -0700 |
---|---|---|
committer | Gregory Maxwell <gmaxwell@gmail.com> | 2012-05-08 12:37:27 -0700 |
commit | f1ae31d8af8e03acbd224d486542b4409acf01ff (patch) | |
tree | c8869fb430c7b33b235e870e1066c9edd47fc3d5 /src/db.cpp | |
parent | fa8cc47c4f70bd3e2b0f4bc5076aba40597b12ec (diff) | |
parent | 1d740055daa6e1668f047186d208b0693c6b21ba (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.cpp | 4 |
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); |