| 18 | |
| 19 | // Create placeholder transactions that have no meaning. |
| 20 | inline CTransactionRef create_placeholder_tx(size_t num_inputs, size_t num_outputs) |
| 21 | { |
| 22 | CMutableTransaction mtx = CMutableTransaction(); |
| 23 | mtx.vin.resize(num_inputs); |
| 24 | mtx.vout.resize(num_outputs); |
| 25 | auto random_script = CScript() << ToByteVector(InsecureRand256()) << ToByteVector(InsecureRand256()); |
| 26 | for (size_t i{0}; i < num_inputs; ++i) { |
| 27 | mtx.vin[i].prevout.hash = InsecureRand256(); |
| 28 | mtx.vin[i].prevout.n = 0; |
| 29 | mtx.vin[i].scriptSig = random_script; |
| 30 | } |
| 31 | for (size_t o{0}; o < num_outputs; ++o) { |
| 32 | mtx.vout[o].nValue = 1 * CENT; |
| 33 | mtx.vout[o].scriptPubKey = random_script; |
| 34 | } |
| 35 | return MakeTransactionRef(mtx); |
| 36 | } |
| 37 | |
| 38 | BOOST_FIXTURE_TEST_CASE(package_sanitization_tests, TestChain100Setup) |
| 39 | { |
no test coverage detected