mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 07:55:39 +01:00
2d2edc1248tests: Use Descriptor wallets for generic wallet tests (Andrew Chow)99516285b7tests: Use legacy change type in subtract fee from outputs test (Andrew Chow)dcd6eeb64atests: Use descriptors in psbt_wallet_tests (Andrew Chow)4b1588c6bdtests: Use DescriptorScriptPubKeyMan in coinselector_tests (Andrew Chow)811319fea4tests, gui: Use DescriptorScriptPubKeyMan in GUI tests (Andrew Chow)9bf0243872bench: Use DescriptorScriptPubKeyMan for wallet things (Andrew Chow)5e54aa9b90bench: remove global testWallet from CoinSelection benchmark (Andrew Chow)a5595b1320tests: Remove global vCoins and testWallet from coinselector_tests (Andrew Chow) Pull request description: Currently, various tests use `LegacyScriptPubKeyMan` because it was convenient for the refactor that introduced the `ScriptPubKeyMan` interface. However, with the legacy wallet slated to be removed, these tests should not continue to use `LegacyScriptPubKeyMan` as they are not testing any specific legacy wallet behavior. These tests are changed to use `DescriptorScriptPubKeyMan`s. Some of the coin selection tests and benchmarks had a global `testWallet`, but this seemed to cause some issues with ensuring that descriptors were set up in that wallet for each test. Those have been restructured to not have any global variables that may be modified between tests. The tests which test specific legacy wallet behavior remain unchanged. ACKs for top commit: laanwj: Code review ACK2d2edc1248brunoerg: tACK2d2edc1248Tree-SHA512: 6d60e5978e822d48e46cfc0dae4635fcb1939f21ea9d84eb72e36112e925554b7ee8f932c7ed0c4881b6566c6c19260bec346abdff1956ca9f300b30fb4e2dd1
Test library
This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui tests).
Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or (when in doubt) a new module should be created.
The utilities in here are compiled into a library, which does not hold any state. However, the main file setup_common
defines the common test setup for all test binaries. The test binaries will handle the global state when they
instantiate the BasicTestingSetup (or one of its derived classes).