diff options
Diffstat (limited to 'src/bench/bench.cpp')
-rw-r--r-- | src/bench/bench.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index 966b99f6c8..da098a6eee 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -4,12 +4,16 @@ #include <bench/bench.h> +#include <chainparams.h> +#include <test/test_bitcoin.h> +#include <validation.h> + +#include <algorithm> #include <assert.h> -#include <iostream> #include <iomanip> -#include <algorithm> -#include <regex> +#include <iostream> #include <numeric> +#include <regex> void benchmark::ConsolePrinter::header() { @@ -108,6 +112,13 @@ void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double printer.header(); for (const auto& p : benchmarks()) { + TestingSetup test{CBaseChainParams::REGTEST}; + { + assert(::chainActive.Height() == 0); + const bool witness_enabled{IsWitnessEnabled(::chainActive.Tip(), Params().GetConsensus())}; + assert(witness_enabled); + } + if (!std::regex_match(p.first, baseMatch, reFilter)) { continue; } |