aboutsummaryrefslogtreecommitdiff
path: root/src/test/sighash_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/sighash_tests.cpp')
-rw-r--r--src/test/sighash_tests.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 805c09c1a4..b8d6bdd730 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -98,16 +98,16 @@ void static RandomTransaction(CMutableTransaction &tx, bool fSingle) {
tx.nVersion = insecure_rand();
tx.vin.clear();
tx.vout.clear();
- tx.nLockTime = (insecure_randrange(2)) ? insecure_rand() : 0;
- int ins = (insecure_randrange(4)) + 1;
- int outs = fSingle ? ins : (insecure_randrange(4)) + 1;
+ tx.nLockTime = (insecure_randbool()) ? insecure_rand() : 0;
+ int ins = (insecure_randbits(2)) + 1;
+ int outs = fSingle ? ins : (insecure_randbits(2)) + 1;
for (int in = 0; in < ins; in++) {
tx.vin.push_back(CTxIn());
CTxIn &txin = tx.vin.back();
txin.prevout.hash = insecure_rand256();
- txin.prevout.n = insecure_randrange(4);
+ txin.prevout.n = insecure_randbits(2);
RandomScript(txin.scriptSig);
- txin.nSequence = (insecure_randrange(2)) ? insecure_rand() : (unsigned int)-1;
+ txin.nSequence = (insecure_randbool()) ? insecure_rand() : (unsigned int)-1;
}
for (int out = 0; out < outs; out++) {
tx.vout.push_back(CTxOut());