Bitcoin Core 28.99.0
P2P Digital Currency
|
The basic transaction that is broadcasted on the network and contained in blocks. More...
#include <transaction.h>
Public Member Functions | |
CTransaction (const CMutableTransaction &tx) | |
Convert a CMutableTransaction into a CTransaction. More... | |
CTransaction (CMutableTransaction &&tx) | |
template<typename Stream > | |
void | Serialize (Stream &s) const |
template<typename Stream > | |
CTransaction (deserialize_type, const TransactionSerParams ¶ms, Stream &s) | |
This deserializing constructor is provided instead of an Unserialize method. More... | |
template<typename Stream > | |
CTransaction (deserialize_type, Stream &s) | |
bool | IsNull () const |
const Txid & | GetHash () const LIFETIMEBOUND |
const Wtxid & | GetWitnessHash () const LIFETIMEBOUND |
CAmount | GetValueOut () const |
unsigned int | GetTotalSize () const |
Get the total transaction size in bytes, including witness data. More... | |
bool | IsCoinBase () const |
std::string | ToString () const |
bool | HasWitness () const |
Public Attributes | |
const std::vector< CTxIn > | vin |
const std::vector< CTxOut > | vout |
const uint32_t | version |
const uint32_t | nLockTime |
Static Public Attributes | |
static const uint32_t | CURRENT_VERSION {2} |
Private Member Functions | |
Txid | ComputeHash () const |
Wtxid | ComputeWitnessHash () const |
bool | ComputeHasWitness () const |
Private Attributes | |
const bool | m_has_witness |
Memory only. More... | |
const Txid | hash |
const Wtxid | m_witness_hash |
Friends | |
bool | operator== (const CTransaction &a, const CTransaction &b) |
bool | operator!= (const CTransaction &a, const CTransaction &b) |
The basic transaction that is broadcasted on the network and contained in blocks.
A transaction can contain multiple inputs and outputs.
Definition at line 295 of file transaction.h.
|
explicit |
Convert a CMutableTransaction into a CTransaction.
Definition at line 95 of file transaction.cpp.
|
explicit |
Definition at line 96 of file transaction.cpp.
|
inline |
This deserializing constructor is provided instead of an Unserialize method.
Unserialize is not possible, since it would require overwriting const fields.
Definition at line 335 of file transaction.h.
|
inline |
Definition at line 337 of file transaction.h.
|
private |
|
private |
Definition at line 74 of file transaction.cpp.
|
private |
|
inline |
unsigned int CTransaction::GetTotalSize | ( | ) | const |
Get the total transaction size in bytes, including witness data.
"Total Size" defined in BIP141 and BIP144.
Definition at line 110 of file transaction.cpp.
CAmount CTransaction::GetValueOut | ( | ) | const |
Definition at line 98 of file transaction.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::string CTransaction::ToString | ( | ) | const |
Definition at line 115 of file transaction.cpp.
|
friend |
Definition at line 366 of file transaction.h.
|
friend |
Definition at line 361 of file transaction.h.
|
static |
Definition at line 299 of file transaction.h.
|
private |
Definition at line 314 of file transaction.h.
|
private |
Memory only.
Definition at line 313 of file transaction.h.
|
private |
Definition at line 315 of file transaction.h.
const uint32_t CTransaction::nLockTime |
Definition at line 309 of file transaction.h.
const uint32_t CTransaction::version |
Definition at line 308 of file transaction.h.
const std::vector<CTxIn> CTransaction::vin |
Definition at line 306 of file transaction.h.
const std::vector<CTxOut> CTransaction::vout |
Definition at line 307 of file transaction.h.