HomePhabricator

test: Create InsecureRandMoneyAmount() helper, de-duplicate add_coin methods

Description

test: Create InsecureRandMoneyAmount() helper, de-duplicate add_coin methods

Summary:
Generate semi-random Amounts up to MAX_MONEY rather than only uint32, and use it in the unit tests.

This concludes backport of core#26490
https://github.com/bitcoin/bitcoin/pull/26940/commits/9d92c3d7f42c18939a9a6aa1ee185f1c958360a0
https://github.com/bitcoin/bitcoin/pull/26940/commits/4275195606e6f42466d9a8ef766b3035833df4d5

Depends on D16155

Test Plan: ninja check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on May 14 2024, 13:06
PiRKPushed on May 16 2024, 11:57
Reviewer
Restricted Project
Differential Revision
D16156: test: Create InsecureRandMoneyAmount() helper, de-duplicate add_coin methods
Parents
rABC4d970e2fdeef: Move random test util code from setup_common to random
Branches
Unknown
Tags
Unknown