Merge pull request #883 from sipa/loadblock
Add -loadblock to load from an external blk000?.dat file
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user