Skip to content

Commit

Permalink
Display check end status again
Browse files Browse the repository at this point in the history
  • Loading branch information
haorldbchi committed Sep 21, 2023
1 parent 14c4da0 commit 3db759c
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/tools/PlotChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,27 @@ class PlotCheckerImpl : public PlotChecker
Log::Line( "Any actions against plot '%s' will be ignored.", plotPath );
}
}
else if( _cfg.deletePlots )
{
// Check threshold for plot deletion
const double passRate = result.proofCount / (double)result.checkCount;

// Print stats
if( !_cfg.silent )
{
std::string seedHex = BytesToHexStdString( result.seedUsed, sizeof( result.seedUsed ) );
Log::Line( "Seed used: 0x%s", seedHex.c_str() );
Log::Line( "Proofs requested/fetched: %llu / %llu ( %.3lf%% )", result.proofCount, result.checkCount, passRate * 100.0 );

if( result.proofFetchFailCount > 0 )
Log::Line( "Proof fetches failed : %llu ( %.3lf%% )", result.proofFetchFailCount, result.proofFetchFailCount / (double)result.checkCount * 100.0 );
if( result.proofValidationFailCount > 0 )
Log::Line( "Proof validation failed : %llu ( %.3lf%% )", result.proofValidationFailCount, result.proofValidationFailCount / (double)result.checkCount * 100.0 );
Log::NewLine();
}
// Check threshold for plot deletion
const double passRate = result.proofCount / (double)result.checkCount;

// Delete the plot if it's below the set threshold
// Print stats
if( !_cfg.silent )
{
std::string seedHex = BytesToHexStdString( result.seedUsed, sizeof( result.seedUsed ) );
Log::Line( "Seed used: 0x%s", seedHex.c_str() );
Log::Line( "Proofs requested/fetched: %llu / %llu ( %.3lf%% )", result.proofCount, result.checkCount, passRate * 100.0 );

if( result.proofFetchFailCount > 0 )
Log::Line( "Proof fetches failed : %llu ( %.3lf%% )", result.proofFetchFailCount, result.proofFetchFailCount / (double)result.checkCount * 100.0 );
if( result.proofValidationFailCount > 0 )
Log::Line( "Proof validation failed : %llu ( %.3lf%% )", result.proofValidationFailCount, result.proofValidationFailCount / (double)result.checkCount * 100.0 );
Log::NewLine();
}

// Delete the plot if it's below the set threshold
if( _cfg.deletePlots )
{
if( result.proofFetchFailCount > 0 || passRate < _cfg.deleteThreshold )
{
if( !_cfg.silent )
Expand Down

0 comments on commit 3db759c

Please sign in to comment.