diff options
author | merge-script <fanquake@gmail.com> | 2024-07-15 17:21:55 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-07-15 17:21:55 +0100 |
commit | ff827a8f46e504712285c145e13e72e1b19eb169 (patch) | |
tree | 6422a69ba7e162c7dce004cc3584d51ee9cd2eff /src/test/disconnected_transactions.cpp | |
parent | 262260ce1e919613ba60194a5861b0b0a51dfe01 (diff) | |
parent | fa690c8e532672f7ab53be6f7a0bb3070858745e (diff) |
Merge bitcoin/bitcoin#30407: test: [refactor] Pass TestOpts
fa690c8e532672f7ab53be6f7a0bb3070858745e test: [refactor] Pass TestOpts (MarcoFalke)
Pull request description:
Currently optional test context setup settings are passed by adding a new optional argument to the constructors. For example `extra_args`. This is problematic, because:
* Adding more optional settings in the future requires touching all affected constructors, increasing their verbosity.
* Setting only a later option requires setting the earlier ones.
* Clang-tidy named args passed to `std::make_unique` are not checked.
Fix all issues by adding a new struct `TestOpts`, which holds all options. Notes:
* The chain type is not an option in the struct for now, because the default values vary.
* The struct holds all possible test options globally. Not all fields may be used by all constructors. Albeit harmless, it is up to the test author to not set a field that is unused.
ACKs for top commit:
kevkevinpal:
utACK [fa690c8](https://github.com/bitcoin/bitcoin/pull/30407/commits/fa690c8e532672f7ab53be6f7a0bb3070858745e)
dergoegge:
utACK fa690c8e532672f7ab53be6f7a0bb3070858745e
TheCharlatan:
Nice, ACK fa690c8e532672f7ab53be6f7a0bb3070858745e
Tree-SHA512: 8db8efa5dff854a73757d3f454f8f902e41bb4358f5f9bae29dbb3e251e20ee93489605de51d0822ba31d97835cd15526a29c075278dd6a8bbde26134feb4f49
Diffstat (limited to 'src/test/disconnected_transactions.cpp')
0 files changed, 0 insertions, 0 deletions