From faa92a2297b4a6aebdd58d1818c428f1c0346078 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 17 Dec 2019 07:11:44 +0700 Subject: rpc: Remove mempool global from miner --- src/bench/bench.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bench/bench.cpp') diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index cc159eb191..745fd0966d 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -15,6 +15,8 @@ #include #include +const RegTestingSetup* g_testing_setup = nullptr; + void benchmark::ConsolePrinter::header() { std::cout << "# Benchmark, evals, iterations, total, min, max, median" << std::endl; @@ -113,6 +115,8 @@ void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double for (const auto& p : benchmarks()) { RegTestingSetup test{}; + assert(g_testing_setup == nullptr); + g_testing_setup = &test; { LOCK(cs_main); assert(::ChainActive().Height() == 0); @@ -133,6 +137,7 @@ void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double p.second.func(state); } printer.result(state); + g_testing_setup = nullptr; } printer.footer(); -- cgit v1.2.3