Changeset View
Changeset View
Standalone View
Standalone View
src/test/script_tests.cpp
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | |||||
static CMutableTransaction | static CMutableTransaction | ||||
BuildSpendingTransaction(const CScript &scriptSig, | BuildSpendingTransaction(const CScript &scriptSig, | ||||
const CMutableTransaction &txCredit) { | const CMutableTransaction &txCredit) { | ||||
CMutableTransaction txSpend; | CMutableTransaction txSpend; | ||||
txSpend.nVersion = 1; | txSpend.nVersion = 1; | ||||
txSpend.nLockTime = 0; | txSpend.nLockTime = 0; | ||||
txSpend.vin.resize(1); | txSpend.vin.resize(1); | ||||
txSpend.vout.resize(1); | txSpend.vout.resize(1); | ||||
txSpend.vin[0].prevout.hash = txCredit.GetId(); | txSpend.vin[0].prevout.hash = txCredit.GetHash(); | ||||
txSpend.vin[0].prevout.n = 0; | txSpend.vin[0].prevout.n = 0; | ||||
txSpend.vin[0].scriptSig = scriptSig; | txSpend.vin[0].scriptSig = scriptSig; | ||||
txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; | txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; | ||||
txSpend.vout[0].scriptPubKey = CScript(); | txSpend.vout[0].scriptPubKey = CScript(); | ||||
txSpend.vout[0].nValue = txCredit.vout[0].nValue; | txSpend.vout[0].nValue = txCredit.vout[0].nValue; | ||||
return txSpend; | return txSpend; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,615 Lines • Show Last 20 Lines |