86 for (
const auto& tx_out :
vout) {
87 nValueOut += tx_out.nValue;
89 throw std::runtime_error(std::string(__func__) +
": value out of range");
102 str +=
strprintf(
"CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
108 for (
const auto& tx_in :
vin)
109 str +=
" " + tx_in.ToString() +
"\n";
110 for (
const auto& tx_in :
vin)
111 str +=
" " + tx_in.scriptWitness.ToString() +
"\n";
112 for (
const auto& tx_out :
vout)
113 str +=
" " + tx_out.ToString() +
"\n";
uint256 SerializeHash(const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
Compute the 256-bit hash of an object's serialization.
static const uint32_t SEQUENCE_FINAL
bool MoneyRange(const CAmount &nValue)
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
std::string ToString() const
std::string ToString() const
std::string ToString() const
const uint256 hash
Memory only.
const std::vector< CTxIn > vin
CAmount GetValueOut() const
size_t GetSerializeSize(const T &t, int nVersion=0)
int64_t CAmount
Amount in satoshis (Can be negative)
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.
uint256 ComputeHash() const
uint256 ComputeWitnessHash() 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
Get the total transaction size in bytes, including witness data.
The basic transaction that is broadcasted on the network and contained in blocks. ...