@ -3990,7 +3990,7 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview,
LogPrintf ( " [0%%]... " ) ; /* Continued */
LogPrintf ( " [0%%]... " ) ; /* Continued */
for ( pindex = chainActive . Tip ( ) ; pindex & & pindex - > pprev ; pindex = pindex - > pprev ) {
for ( pindex = chainActive . Tip ( ) ; pindex & & pindex - > pprev ; pindex = pindex - > pprev ) {
boost : : this_thread : : interruption_point ( ) ;
boost : : this_thread : : interruption_point ( ) ;
int percentageDone = std : : max ( 1 , std : : min ( 99 , ( int ) ( ( ( double ) ( chainActive . Height ( ) - pindex - > nHeight ) ) / ( double ) nCheckDepth * ( nCheckLevel > = 4 ? 50 : 100 ) ) ) ) ;
const int percentageDone = std : : max ( 1 , std : : min ( 99 , ( int ) ( ( ( double ) ( chainActive . Height ( ) - pindex - > nHeight ) ) / ( double ) nCheckDepth * ( nCheckLevel > = 4 ? 50 : 100 ) ) ) ) ;
if ( reportDone < percentageDone / 10 ) {
if ( reportDone < percentageDone / 10 ) {
// report every 10% step
// report every 10% step
LogPrintf ( " [%d%%]... " , percentageDone ) ; /* Continued */
LogPrintf ( " [%d%%]... " , percentageDone ) ; /* Continued */
@ -4048,7 +4048,13 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview,
if ( nCheckLevel > = 4 ) {
if ( nCheckLevel > = 4 ) {
while ( pindex ! = chainActive . Tip ( ) ) {
while ( pindex ! = chainActive . Tip ( ) ) {
boost : : this_thread : : interruption_point ( ) ;
boost : : this_thread : : interruption_point ( ) ;
uiInterface . ShowProgress ( _ ( " Verifying blocks... " ) , std : : max ( 1 , std : : min ( 99 , 100 - ( int ) ( ( ( double ) ( chainActive . Height ( ) - pindex - > nHeight ) ) / ( double ) nCheckDepth * 50 ) ) ) , false ) ;
const int percentageDone = std : : max ( 1 , std : : min ( 99 , 100 - ( int ) ( ( ( double ) ( chainActive . Height ( ) - pindex - > nHeight ) ) / ( double ) nCheckDepth * 50 ) ) ) ;
if ( reportDone < percentageDone / 10 ) {
// report every 10% step
LogPrintf ( " [%d%%]... " , percentageDone ) ; /* Continued */
reportDone = percentageDone / 10 ;
}
uiInterface . ShowProgress ( _ ( " Verifying blocks... " ) , percentageDone , false ) ;
pindex = chainActive . Next ( pindex ) ;
pindex = chainActive . Next ( pindex ) ;
CBlock block ;
CBlock block ;
if ( ! ReadBlockFromDisk ( block , pindex , chainparams . GetConsensus ( ) ) )
if ( ! ReadBlockFromDisk ( block , pindex , chainparams . GetConsensus ( ) ) )