rpc: Remove mempool global from miner
This commit is contained in:
13 files changed
+92
-53
No files matched your search
@@ -15,6 +15,8 @@
|
||||
#include <numeric>
|
||||
#include <regex>
|
||||
|
||||
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();
|
||||
|
||||
Reference in new issue
Block a user