Changeset View
Changeset View
Standalone View
Standalone View
src/test/transaction_tests.cpp
Show First 20 Lines • Show All 464 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(test_big_transaction) { | ||||
// check all inputs concurrently, with the cache | // check all inputs concurrently, with the cache | ||||
PrecomputedTransactionData txdata(tx); | PrecomputedTransactionData txdata(tx); | ||||
boost::thread_group threadGroup; | boost::thread_group threadGroup; | ||||
CCheckQueue<CScriptCheck> scriptcheckqueue(128); | CCheckQueue<CScriptCheck> scriptcheckqueue(128); | ||||
CCheckQueueControl<CScriptCheck> control(&scriptcheckqueue); | CCheckQueueControl<CScriptCheck> control(&scriptcheckqueue); | ||||
for (int i = 0; i < 20; i++) { | for (int i = 0; i < 20; i++) { | ||||
threadGroup.create_thread(boost::bind( | threadGroup.create_thread(std::bind(&CCheckQueue<CScriptCheck>::Thread, | ||||
&CCheckQueue<CScriptCheck>::Thread, boost::ref(scriptcheckqueue))); | std::ref(scriptcheckqueue))); | ||||
} | } | ||||
std::vector<Coin> coins; | std::vector<Coin> coins; | ||||
for (size_t i = 0; i < mtx.vin.size(); i++) { | for (size_t i = 0; i < mtx.vin.size(); i++) { | ||||
CTxOut out; | CTxOut out; | ||||
out.nValue = 1000 * SATOSHI; | out.nValue = 1000 * SATOSHI; | ||||
out.scriptPubKey = scriptPubKey; | out.scriptPubKey = scriptPubKey; | ||||
coins.emplace_back(std::move(out), 1, false); | coins.emplace_back(std::move(out), 1, false); | ||||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |