Changeset View
Changeset View
Standalone View
Standalone View
src/primitives/transaction.cpp
Show All 24 Lines | CTxIn::CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn, | ||||
scriptSig = scriptSigIn; | scriptSig = scriptSigIn; | ||||
nSequence = nSequenceIn; | nSequence = nSequenceIn; | ||||
} | } | ||||
std::string CTxIn::ToString() const { | std::string CTxIn::ToString() const { | ||||
std::string str; | std::string str; | ||||
str += "CTxIn("; | str += "CTxIn("; | ||||
str += prevout.ToString(); | str += prevout.ToString(); | ||||
if (prevout.IsNull()) | if (prevout.IsNull()) { | ||||
str += strprintf(", coinbase %s", HexStr(scriptSig)); | str += strprintf(", coinbase %s", HexStr(scriptSig)); | ||||
else | } else { | ||||
str += strprintf(", scriptSig=%s", HexStr(scriptSig).substr(0, 24)); | str += strprintf(", scriptSig=%s", HexStr(scriptSig).substr(0, 24)); | ||||
if (nSequence != SEQUENCE_FINAL) | } | ||||
if (nSequence != SEQUENCE_FINAL) { | |||||
str += strprintf(", nSequence=%u", nSequence); | str += strprintf(", nSequence=%u", nSequence); | ||||
} | |||||
str += ")"; | str += ")"; | ||||
return str; | return str; | ||||
} | } | ||||
CTxOut::CTxOut(const Amount &nValueIn, CScript scriptPubKeyIn) { | CTxOut::CTxOut(const Amount &nValueIn, CScript scriptPubKeyIn) { | ||||
nValue = nValueIn; | nValue = nValueIn; | ||||
scriptPubKey = scriptPubKeyIn; | scriptPubKey = scriptPubKeyIn; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |