Browse Source

Fix sighash tests

pull/145/head
Taylor Hornby 8 years ago
parent
commit
3098bab6d6
  1. 1000
      src/test/data/sighash.json
  2. 7
      src/test/sighash_tests.cpp

1000
src/test/data/sighash.json

File diff suppressed because one or more lines are too long

7
src/test/sighash_tests.cpp

@ -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();

Loading…
Cancel
Save