mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
The function does not need anything from any chainstate, so it should not sit in the Chainstate class. Also, mark it [[nodiscard]], and the one place that ignores the return value with (void). Also, change the error log strings to not include the __func__, which is redundant with -logsourcelocations. This is not a refactor, but this log is only for debugging extremely rare errors.
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).