Merge pull request #4768

2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
This commit is contained in:
Wladimir J. van der Laan
2014-09-01 09:41:50 +02:00
4 changed files with 5 additions and 5 deletions

View File

@@ -2898,7 +2898,7 @@ CVerifyDB::~CVerifyDB()
uiInterface.ShowProgress("", 100);
}
bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth)
bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth)
{
LOCK(cs_main);
if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL)
@@ -2911,7 +2911,7 @@ bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth)
nCheckDepth = chainActive.Height();
nCheckLevel = std::max(0, std::min(4, 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* pindexFailure = NULL;
int nGoodTransactions = 0;