Changeset View
Changeset View
Standalone View
Standalone View
src/test/sighash_tests.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | for (int out = 0; out < outs; out++) { | ||||
txout.nValue = int64_t(InsecureRandRange(100000000)) * SATOSHI; | txout.nValue = int64_t(InsecureRandRange(100000000)) * SATOSHI; | ||||
RandomScript(txout.scriptPubKey); | RandomScript(txout.scriptPubKey); | ||||
} | } | ||||
} | } | ||||
BOOST_FIXTURE_TEST_SUITE(sighash_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(sighash_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(sighash_test) { | BOOST_AUTO_TEST_CASE(sighash_test) { | ||||
SeedInsecureRand(false); | |||||
#if defined(PRINT_SIGHASH_JSON) | #if defined(PRINT_SIGHASH_JSON) | ||||
std::cout << "[\n"; | std::cout << "[\n"; | ||||
std::cout << "\t[\"raw_transaction, script, input_index, hashType, " | std::cout << "\t[\"raw_transaction, script, input_index, hashType, " | ||||
"signature_hash (regular), signature_hash(no forkid), " | "signature_hash (regular), signature_hash(no forkid), " | ||||
"signature_hash(replay protected)\"],\n"; | "signature_hash(replay protected)\"],\n"; | ||||
#endif | #endif | ||||
int nRandomTests = 1000; | int nRandomTests = 1000; | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |