29 scriptSig = scriptSigIn;
30 nSequence = nSequenceIn;
36 scriptSig = scriptSigIn;
37 nSequence = nSequenceIn;
44 str += prevout.ToString();
49 if (nSequence != SEQUENCE_FINAL)
50 str +=
strprintf(
", nSequence=%u", nSequence);
58 scriptPubKey = scriptPubKeyIn;
63 return strprintf(
"CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN,
HexStr(scriptPubKey).substr(0, 30));
95 for (
const auto& tx_out :
vout) {
96 nValueOut += tx_out.nValue;
98 throw std::runtime_error(std::string(__func__) +
": value out of range");
111 str +=
strprintf(
"CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
117 for (
const auto& tx_in :
vin)
118 str +=
" " + tx_in.ToString() +
"\n";
119 for (
const auto& tx_in : vin)
120 str +=
" " + tx_in.scriptWitness.ToString() +
"\n";
121 for (
const auto& tx_out :
vout)
122 str +=
" " + tx_out.ToString() +
"\n";
uint256 GetWitnessHash() const
size_t GetSerializeSize(const T &t, int nType, int nVersion=0)
std::string ToSerializedString() const
bool MoneyRange(const CAmount &nValue)
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
std::string ToString() const
Double ended buffer combining vector and stream-like interfaces.
std::string ToString() const
std::string ToString() const
const uint256 hash
Memory only.
const std::vector< CTxIn > vin
CAmount GetValueOut() const
int64_t CAmount
Amount in corbies (Can be negative)
uint256 SerializeHash(const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
Compute the 256-bit hash of an object's serialization.
const uint256 & GetHash() const
const std::vector< CTxOut > vout
std::string ToString() const
An outpoint - a combination of a transaction hash and an index n into its vout.
std::vector< CTxOut > vout
uint256 ComputeHash() const
uint256 GetHash() const
Compute the hash of this CMutableTransaction.
Serialized script, used inside transaction inputs and outputs.
CTransaction()
Construct a CTransaction that qualifies as IsNull()
std::string ToString() const
A mutable version of CTransaction.
unsigned int GetTotalSize() const
RVN END.
The basic transaction that is broadcasted on the network and contained in blocks. ...