Fix sighash tests

This commit is contained in:
Taylor Hornby 2016-04-28 09:44:12 -06:00
parent 6ad4db2253
commit 3098bab6d6
2 changed files with 505 additions and 502 deletions

File diff suppressed because one or more lines are too long

View File

@ -119,8 +119,11 @@ void static RandomTransaction(CMutableTransaction &tx, bool fSingle) {
if (tx.nVersion >= 2) {
for (int pour = 0; pour < pours; pour++) {
CPourTx pourtx;
pourtx.vpub_old = insecure_rand() % 100000000;
pourtx.vpub_new = insecure_rand() % 100000000;
if (insecure_rand() % 2 == 0) {
pourtx.vpub_old = insecure_rand() % 100000000;
} else {
pourtx.vpub_new = insecure_rand() % 100000000;
}
RandomScript(pourtx.scriptPubKey);
RandomScript(pourtx.scriptSig);
pourtx.anchor = GetRandHash();