diff options
author | Johnson Lau <jl2012@xbt.hk> | 2017-07-30 17:32:39 +0800 |
---|---|---|
committer | Johnson Lau <jl2012@xbt.hk> | 2017-08-30 18:32:17 +0800 |
commit | e912118786f867d6821e2c1a2e4e1d4937fefd85 (patch) | |
tree | eb5c2d19e238f1ceb59ba19ff6c86868197e1ecb /src/test | |
parent | a90e6d2bffc422ddcdb771c53aac0bceb970a2c4 (diff) | |
download | bitcoin-e912118786f867d6821e2c1a2e4e1d4937fefd85.tar.xz |
[Refactor] Combine scriptPubKey and amount as CTxOut in CScriptCheck
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/script_P2SH_tests.cpp | 3 | ||||
-rw-r--r-- | src/test/transaction_tests.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index efd0f77d9f..58aa32c969 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -112,8 +112,7 @@ BOOST_AUTO_TEST_CASE(sign) { CScript sigSave = txTo[i].vin[0].scriptSig; txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig; - const CTxOut& output = txFrom.vout[txTo[i].vin[0].prevout.n]; - bool sigOK = CScriptCheck(output.scriptPubKey, output.nValue, txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, false, &txdata)(); + bool sigOK = CScriptCheck(txFrom.vout[txTo[i].vin[0].prevout.n], txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, false, &txdata)(); if (i == j) BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j)); else diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 6654634bf1..cb6ab7cdbe 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -480,8 +480,7 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) { for(uint32_t i = 0; i < mtx.vin.size(); i++) { std::vector<CScriptCheck> vChecks; - 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); + CScriptCheck check(coins[tx.vin[i].prevout.n].out, tx, i, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, false, &txdata); vChecks.push_back(CScriptCheck()); check.swap(vChecks.back()); control.Add(vChecks); |