Changeset View
Changeset View
Standalone View
Standalone View
src/test/sigopcount_tests.cpp
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | BOOST_CHECK_EQUAL( | ||||
GetMaxBlockSigOpsCount(std::numeric_limits<uint32_t>::max()), | GetMaxBlockSigOpsCount(std::numeric_limits<uint32_t>::max()), | ||||
4295 * MAX_BLOCK_SIGOPS_PER_MB); | 4295 * MAX_BLOCK_SIGOPS_PER_MB); | ||||
} | } | ||||
BOOST_AUTO_TEST_CASE(test_max_sigops_per_tx) { | BOOST_AUTO_TEST_CASE(test_max_sigops_per_tx) { | ||||
CMutableTransaction tx; | CMutableTransaction tx; | ||||
tx.nVersion = 1; | tx.nVersion = 1; | ||||
tx.vin.resize(1); | tx.vin.resize(1); | ||||
tx.vin[0].prevout = COutPoint(InsecureRand256(), 0); | tx.vin[0].prevout = COutPoint(TxId(InsecureRand256()), 0); | ||||
tx.vin[0].scriptSig = CScript(); | tx.vin[0].scriptSig = CScript(); | ||||
tx.vout.resize(1); | tx.vout.resize(1); | ||||
tx.vout[0].nValue = SATOSHI; | tx.vout[0].nValue = SATOSHI; | ||||
tx.vout[0].scriptPubKey = CScript(); | tx.vout[0].scriptPubKey = CScript(); | ||||
{ | { | ||||
CValidationState state; | CValidationState state; | ||||
BOOST_CHECK(CheckRegularTransaction(CTransaction(tx), state)); | BOOST_CHECK(CheckRegularTransaction(CTransaction(tx), state)); | ||||
Show All 23 Lines |