mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Switch CScriptCheck to use Coin instead of CCoins
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user