diff options
author | Andrew Chow <github@achow101.com> | 2023-02-17 17:20:48 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-02-17 17:28:14 -0500 |
commit | a245429d680eb95cf4c0c78e58e63e3f0f5d979a (patch) | |
tree | c9d8e22620bdf98de5ddaa2b3e41cb49fcfba67f /src/test/dbwrapper_tests.cpp | |
parent | 9321df4487682b9693691132d9cf3f6b158b4c0a (diff) | |
parent | 4275195606e6f42466d9a8ef766b3035833df4d5 (diff) |
Merge bitcoin/bitcoin#26940: test: create random and coins utils, add amount helper, dedupe add_coin
4275195606e6f42466d9a8ef766b3035833df4d5 De-duplicate add_coin methods to a test util helper (Jon Atack)
9d92c3d7f42c18939a9a6aa1ee185f1c958360a0 Create InsecureRandMoneyAmount() test util helper (Jon Atack)
81f5ade2a324167c03c5ce765a26bd42ed652723 Move random test util code from setup_common to random (Jon Atack)
Pull request description:
- Move random test utilities from `setup_common` to a new `random` file, as many tests don't use this code.
- Create a helper to generate semi-random CAmounts up to `MONEY_RANGE` rather than only uint32, and use the helper in the unit tests.
- De-duplicate a shared `add_coin` method by extracting it to a `coins` test utility.
ACKs for top commit:
pinheadmz:
ACK 4275195606e6f42466d9a8ef766b3035833df4d5
achow101:
ACK 4275195606e6f42466d9a8ef766b3035833df4d5
john-moffett:
ACK 4275195606e6f42466d9a8ef766b3035833df4d5
Tree-SHA512: 3ed974251149c7417f935ef2f8865aa0dcc33b281b47522b0f96f1979dff94bb8527957f098fe4d210f40d715c00f29512f2ffe189097102229023b7284a3a27
Diffstat (limited to 'src/test/dbwrapper_tests.cpp')
-rw-r--r-- | src/test/dbwrapper_tests.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index 1c26acb7f5..723a1ceee3 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <dbwrapper.h> +#include <test/util/random.h> #include <test/util/setup_common.h> #include <uint256.h> #include <util/string.h> |