HomePhabricator

bench: Remove requirement that all benches use same testing setup

Description

bench: Remove requirement that all benches use same testing setup

Summary:

The benches have always set up one global testing setup. This makes it hard to pick no testing setup at all or one with different params.

Fix this by removing any global state setup from the main bench.cpp and leave the setup to each individual bench.

One reason to have one global testing setup is to set the datadir location to a tempdir to avoid reading or writing in the default datadir location. But #13687 should prevent this already.

Commit fab117096446ab63d1f38c1ef6edbc94a5d4ab52

bench: Remove requirement that all benches use RegTestingSetup

Commit fa1fdb02fccd0f670f7b08ee61c249f04d0db17f

bench: Replace ::mempool globabl with test_setup.mempool
This is a refactor, since they are aliases for each other

This is a backport of Core PR18575

The changes in verify_script.cpp are not relevant to ABC.

Test Plan: ninja all && src/bench/bitcoin-bench

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9040

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jan 22 2021, 16:21
PiRKCommitted on Jan 22 2021, 16:28
abc-botPushed on Jan 22 2021, 16:28
Reviewer
Restricted Project
Differential Revision
D9040: bench: Remove requirement that all benches use same testing setup
Parents
rABC048b9b0884bc: [Cashtab] Add unit tests for send BCHA amount validation
Branches
Unknown
Tags
Unknown