diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-04-25 11:29:32 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-01 11:56:06 -0700 |
commit | 8b3868c1b4bf89c41b26ecb3a4b7c3a2557e3868 (patch) | |
tree | 7183c0a73358e4eb26a5d163c18d88be12972631 /src/test/transaction_tests.cpp | |
parent | c87b957a32e03c09d410abadf661f87eb813bcdb (diff) | |
download | bitcoin-8b3868c1b4bf89c41b26ecb3a4b7c3a2557e3868.tar.xz |
Switch CScriptCheck to use Coin instead of CCoins
Diffstat (limited to 'src/test/transaction_tests.cpp')
-rw-r--r-- | src/test/transaction_tests.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 986922b2a7..5c7516fbf1 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -470,18 +470,19 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) { for (int i=0; i<20; i++) threadGroup.create_thread(boost::bind(&CCheckQueue<CScriptCheck>::Thread, boost::ref(scriptcheckqueue))); - CCoins coins; - coins.fCoinBase = false; + std::vector<Coin> coins; for(uint32_t i = 0; i < mtx.vin.size(); i++) { - CTxOut txout; - txout.nValue = 1000; - txout.scriptPubKey = scriptPubKey; - coins.vout.push_back(txout); + Coin coin; + coin.nHeight = 1; + coin.fCoinBase = false; + coin.out.nValue = 1000; + coin.out.scriptPubKey = scriptPubKey; + coins.emplace_back(std::move(coin)); } for(uint32_t i = 0; i < mtx.vin.size(); i++) { std::vector<CScriptCheck> vChecks; - const CTxOut& output = coins.vout[tx.vin[i].prevout.n]; + const CTxOut& output = coins[tx.vin[i].prevout.n].out; CScriptCheck check(output.scriptPubKey, output.nValue, tx, i, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, false, &txdata); vChecks.push_back(CScriptCheck()); check.swap(vChecks.back()); |