FIXME: Dedup with BuildSpendingTransaction in test/script_tests.cpp.
| 33 | |
| 34 | // FIXME: Dedup with BuildSpendingTransaction in test/script_tests.cpp. |
| 35 | static CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMutableTransaction& txCredit) |
| 36 | { |
| 37 | CMutableTransaction txSpend; |
| 38 | txSpend.nVersion = 1; |
| 39 | txSpend.nLockTime = 0; |
| 40 | txSpend.vin.resize(1); |
| 41 | txSpend.vout.resize(1); |
| 42 | txSpend.vin[0].prevout.hash = txCredit.GetHash(); |
| 43 | txSpend.vin[0].prevout.n = 0; |
| 44 | txSpend.vin[0].scriptSig = scriptSig; |
| 45 | txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; |
| 46 | txSpend.vout[0].scriptPubKey = CScript(); |
| 47 | txSpend.vout[0].nValue = txCredit.vout[0].nValue; |
| 48 | |
| 49 | return txSpend; |
| 50 | } |
| 51 | |
| 52 | // Microbenchmark for verification of a basic P2WPKH script. Can be easily |
| 53 | // modified to measure performance of other types of scripts. |
no test coverage detected