Improve block database load error reporting

This commit is contained in:
Pieter Wuille
2013-02-16 17:58:45 +01:00
parent 2f0fa79db2
commit f7f3a96b74
9 changed files with 91 additions and 23 deletions

View File

@@ -2653,6 +2653,18 @@ bool VerifyDB() {
return true;
}
void UnloadBlockIndex()
{
mapBlockIndex.clear();
setBlockIndexValid.clear();
pindexGenesisBlock = NULL;
nBestHeight = 0;
bnBestChainWork = 0;
bnBestInvalidWork = 0;
hashBestChain = 0;
pindexBest = NULL;
}
bool LoadBlockIndex()
{
if (fTestNet)