merge bitcoin#18575: Remove requirement that all benches use same testing setup

This commit is contained in:
Kittywhiskers Van Gogh 2022-06-03 20:56:15 +05:30
parent 0af1a5a969
commit b9f1ddf766
2 changed files with 1 additions and 6 deletions

View File

@ -53,11 +53,6 @@ void benchmark::BenchRunner::RunAll(const Args& args)
std::vector<ankerl::nanobench::Result> benchmarkResults; std::vector<ankerl::nanobench::Result> benchmarkResults;
for (const auto& p : benchmarks()) { for (const auto& p : benchmarks()) {
RegTestingSetup test{};
{
assert(::ChainActive().Height() == 0);
}
if (!std::regex_match(p.first, baseMatch, reFilter)) { if (!std::regex_match(p.first, baseMatch, reFilter)) {
continue; continue;
} }

View File

@ -41,7 +41,7 @@ static void AssembleBlock(benchmark::Bench& bench)
for (const auto& txr : txs) { for (const auto& txr : txs) {
CValidationState state; CValidationState state;
bool ret{::AcceptToMemoryPool(::mempool, state, txr, nullptr /* pfMissingInputs */, false /* bypass_limits */, /* nAbsurdFee */ 0)}; bool ret{::AcceptToMemoryPool(*test_setup.m_node.mempool, state, txr, nullptr /* pfMissingInputs */, false /* bypass_limits */, /* nAbsurdFee */ 0)};
assert(ret); assert(ret);
} }
} }