88 for (
const auto& tx_out :
vout) {
90 throw std::runtime_error(std::string(__func__) +
": value out of range");
91 nValueOut += tx_out.nValue;
105 str +=
strprintf(
"CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
111 for (
const auto& tx_in :
vin)
112 str +=
" " + tx_in.ToString() +
"\n";
113 for (
const auto& tx_in : vin)
114 str +=
" " + tx_in.scriptWitness.ToString() +
"\n";
115 for (
const auto& tx_out :
vout)
116 str +=
" " + tx_out.ToString() +
"\n";
static const int SERIALIZE_TRANSACTION_NO_WITNESS
A flag that is ORed into the protocol version to designate that a transaction should be (un)serialize...
unsigned int GetTotalSize() const
Get the total transaction size in bytes, including witness data.
uint256 ComputeHash() const
static const CAmount COIN
static const uint32_t SEQUENCE_FINAL
bool MoneyRange(const CAmount &nValue)
const uint256 hash
Memory only.
std::string ToString() const
uint256 ComputeWitnessHash() const
const std::vector< CTxIn > vin
size_t GetSerializeSize(const T &t, int nVersion=0)
std::string ToString() const
int64_t CAmount
Amount in satoshis (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.
CAmount GetValueOut() const
const std::vector< CTxOut > vout
An outpoint - a combination of a transaction hash and an index n into its vout.
std::string ToString() const
uint256 GetHash() const
Compute the hash of this CMutableTransaction.
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
std::string ToString() const
std::string ToString() const
Serialized script, used inside transaction inputs and outputs.
static const int PROTOCOL_VERSION
network protocol versioning
CTransaction()
Construct a CTransaction that qualifies as IsNull()
A mutable version of CTransaction.
const uint256 & GetHash() const
The basic transaction that is broadcasted on the network and contained in blocks. ...