|
|
@ -2898,7 +2898,7 @@ CVerifyDB::~CVerifyDB() |
|
|
|
uiInterface.ShowProgress("", 100); |
|
|
|
uiInterface.ShowProgress("", 100); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth) |
|
|
|
bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOCK(cs_main); |
|
|
|
LOCK(cs_main); |
|
|
|
if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL) |
|
|
|
if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL) |
|
|
@ -2911,7 +2911,7 @@ bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth) |
|
|
|
nCheckDepth = chainActive.Height(); |
|
|
|
nCheckDepth = chainActive.Height(); |
|
|
|
nCheckLevel = std::max(0, std::min(4, nCheckLevel)); |
|
|
|
nCheckLevel = std::max(0, std::min(4, nCheckLevel)); |
|
|
|
LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); |
|
|
|
LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); |
|
|
|
CCoinsViewCache coins(*pcoinsTip, true); |
|
|
|
CCoinsViewCache coins(*coinsview, true); |
|
|
|
CBlockIndex* pindexState = chainActive.Tip(); |
|
|
|
CBlockIndex* pindexState = chainActive.Tip(); |
|
|
|
CBlockIndex* pindexFailure = NULL; |
|
|
|
CBlockIndex* pindexFailure = NULL; |
|
|
|
int nGoodTransactions = 0; |
|
|
|
int nGoodTransactions = 0; |
|
|
|