Rename to PrecomputedTransactionData
This commit is contained in:
committed by
Jack Grigg
parent
90285e7b81
commit
6514771a44
@@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
|
||||
BOOST_CHECK_MESSAGE(CheckTransaction(tx, state, verifier), strTest + comment);
|
||||
BOOST_CHECK_MESSAGE(state.IsValid(), comment);
|
||||
|
||||
CachedHashes cachedHashes(tx);
|
||||
PrecomputedTransactionData txdata(tx);
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
if (!mapprevOutScriptPubKeys.count(tx.vin[i].prevout))
|
||||
@@ -161,7 +161,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
|
||||
CAmount amount = 0;
|
||||
unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
|
||||
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
|
||||
verify_flags, TransactionSignatureChecker(&tx, i, amount, cachedHashes), &err),
|
||||
verify_flags, TransactionSignatureChecker(&tx, i, amount, txdata), &err),
|
||||
strTest + comment);
|
||||
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err) + comment);
|
||||
}
|
||||
@@ -234,7 +234,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
|
||||
CValidationState state;
|
||||
fValid = CheckTransaction(tx, state, verifier) && state.IsValid();
|
||||
|
||||
CachedHashes cachedHashes(tx);
|
||||
PrecomputedTransactionData txdata(tx);
|
||||
for (unsigned int i = 0; i < tx.vin.size() && fValid; i++)
|
||||
{
|
||||
if (!mapprevOutScriptPubKeys.count(tx.vin[i].prevout))
|
||||
@@ -246,7 +246,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
|
||||
unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
|
||||
CAmount amount = 0;
|
||||
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
|
||||
verify_flags, TransactionSignatureChecker(&tx, i, amount, cachedHashes), &err);
|
||||
verify_flags, TransactionSignatureChecker(&tx, i, amount, txdata), &err);
|
||||
}
|
||||
BOOST_CHECK_MESSAGE(!fValid, strTest + comment);
|
||||
BOOST_CHECK_MESSAGE(err != SCRIPT_ERR_OK, ScriptErrorString(err) + comment);
|
||||
@@ -606,7 +606,7 @@ BOOST_AUTO_TEST_CASE(test_big_overwinter_transaction) {
|
||||
ssout >> tx;
|
||||
|
||||
// check all inputs concurrently, with the cache
|
||||
CachedHashes cachedHashes(tx);
|
||||
PrecomputedTransactionData txdata(tx);
|
||||
boost::thread_group threadGroup;
|
||||
CCheckQueue<CScriptCheck> scriptcheckqueue(128);
|
||||
CCheckQueueControl<CScriptCheck> control(&scriptcheckqueue);
|
||||
@@ -626,7 +626,7 @@ BOOST_AUTO_TEST_CASE(test_big_overwinter_transaction) {
|
||||
|
||||
for(uint32_t i = 0; i < mtx.vin.size(); i++) {
|
||||
std::vector<CScriptCheck> vChecks;
|
||||
CScriptCheck check(coins, tx, i, SCRIPT_VERIFY_P2SH, false, &cachedHashes);
|
||||
CScriptCheck check(coins, tx, i, SCRIPT_VERIFY_P2SH, false, &txdata);
|
||||
vChecks.push_back(CScriptCheck());
|
||||
check.swap(vChecks.back());
|
||||
control.Add(vChecks);
|
||||
|
||||
Reference in New Issue
Block a user