Changeset View
Changeset View
Standalone View
Standalone View
src/test/transaction_tests.cpp
Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(test_Get) { | ||||
t1.vin[2].scriptSig << std::vector<uint8_t>(65, 0) | t1.vin[2].scriptSig << std::vector<uint8_t>(65, 0) | ||||
<< std::vector<uint8_t>(33, 4); | << std::vector<uint8_t>(33, 4); | ||||
t1.vout.resize(2); | t1.vout.resize(2); | ||||
t1.vout[0].nValue = 90 * CENT; | t1.vout[0].nValue = 90 * CENT; | ||||
t1.vout[0].scriptPubKey << OP_1; | t1.vout[0].scriptPubKey << OP_1; | ||||
BOOST_CHECK(AreInputsStandard(CTransaction(t1), coins, | BOOST_CHECK(AreInputsStandard(CTransaction(t1), coins, | ||||
STANDARD_SCRIPT_VERIFY_FLAGS)); | STANDARD_SCRIPT_VERIFY_FLAGS)); | ||||
BOOST_CHECK_EQUAL(coins.GetValueIn(CTransaction(t1)), | |||||
(50 + 21 + 22) * CENT); | |||||
} | } | ||||
static void CreateCreditAndSpend(const FillableSigningProvider &keystore, | static void CreateCreditAndSpend(const FillableSigningProvider &keystore, | ||||
const CScript &outscript, | const CScript &outscript, | ||||
CTransactionRef &output, | CTransactionRef &output, | ||||
CMutableTransaction &input, | CMutableTransaction &input, | ||||
bool success = true) { | bool success = true) { | ||||
CMutableTransaction outputm; | CMutableTransaction outputm; | ||||
▲ Show 20 Lines • Show All 577 Lines • Show Last 20 Lines |