MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / BuildSpendingTransaction

Function BuildSpendingTransaction

src/test/script_tests.cpp:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMutableTransaction& txCredit)
134{
135 CMutableTransaction txSpend;
136 txSpend.nVersion = 1;
137 txSpend.nLockTime = 0;
138 txSpend.vin.resize(1);
139 txSpend.vout.resize(1);
140 txSpend.vin[0].prevout.hash = txCredit.GetHash();
141 txSpend.vin[0].prevout.n = 0;
142 txSpend.vin[0].scriptSig = scriptSig;
143 txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL;
144 txSpend.vout[0].scriptPubKey = CScript();
145 txSpend.vout[0].nValue = txCredit.vout[0].nValue;
146
147 return txSpend;
148}
149
150void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, const std::string& message, int scriptError, CAmount nValue)
151{

Callers 3

DoTestFunction · 0.85
TestBuilderMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

resizeMethod · 0.80
CScriptClass · 0.50
GetHashMethod · 0.45

Tested by

no test coverage detected