Merge pull request #6084 from str4d/fix-connectblock-benchmarks
bench: Fix ConnectBlock large block benchmarks
This commit is contained in:
commit
dc7f3e74fb
|
@ -3094,8 +3094,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||
fExpensiveChecks = false;
|
||||
}
|
||||
|
||||
// Don't cache results if we're actually connecting blocks (still consult the cache, though).
|
||||
bool fCacheResults = fJustCheck;
|
||||
// Don't cache results if we're actually connecting blocks or benchmarking
|
||||
// (still consult the cache, though, which will be empty for benchmarks).
|
||||
bool fCacheResults = fJustCheck && (blockChecks != CheckAs::SlowBenchmark);
|
||||
|
||||
// proof verification is expensive, disable if possible
|
||||
auto verifier = fExpensiveChecks ? ProofVerifier::Strict() : ProofVerifier::Disabled();
|
||||
|
|
|
@ -594,7 +594,7 @@ double benchmark_connectblock_slow()
|
|||
CValidationState state;
|
||||
struct timeval tv_start;
|
||||
timer_start(tv_start);
|
||||
assert(ConnectBlock(block, state, &index, view, Params(), true));
|
||||
assert(ConnectBlock(block, state, &index, view, Params(), true, CheckAs::SlowBenchmark));
|
||||
auto duration = timer_stop(tv_start);
|
||||
|
||||
// Undo alterations to global state
|
||||
|
|
Loading…
Reference in New Issue