mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
Create InsecureRandMoneyAmount() test util helper
to generate semi-random CAmounts up to MAX_MONEY rather than only uint32, and use it in the unit tests.
This commit is contained in:
@@ -173,7 +173,7 @@ void SimulationTest(CCoinsView* base, bool fake_best_block)
|
||||
|
||||
if (InsecureRandRange(5) == 0 || coin.IsSpent()) {
|
||||
Coin newcoin;
|
||||
newcoin.out.nValue = InsecureRand32();
|
||||
newcoin.out.nValue = InsecureRandMoneyAmount();
|
||||
newcoin.nHeight = 1;
|
||||
|
||||
// Infrequently test adding unspendable coins.
|
||||
|
||||
Reference in New Issue
Block a user