Bitcoin ABC 0.30.3
P2P Digital Currency
|
The basic transaction that is broadcasted on the network and contained in blocks. More...
#include <transaction.h>
Public Member Functions | |
CTransaction () | |
Construct a CTransaction that qualifies as IsNull() More... | |
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, Stream &s) | |
This deserializing constructor is provided instead of an Unserialize method. More... | |
bool | IsNull () const |
const TxId | GetId () const |
const TxHash | GetHash () const |
Amount | GetValueOut () const |
unsigned int | GetTotalSize () const |
Get the total transaction size in bytes. More... | |
bool | IsCoinBase () const |
std::string | ToString () const |
Public Attributes | |
const std::vector< CTxIn > | vin |
const std::vector< CTxOut > | vout |
const int32_t | nVersion |
const uint32_t | nLockTime |
Static Public Attributes | |
static constexpr int32_t | CURRENT_VERSION = 2 |
static constexpr int32_t | MIN_VERSION = 1 |
static constexpr int32_t | MAX_VERSION = 2 |
Private Member Functions | |
uint256 | ComputeHash () const |
Private Attributes | |
const uint256 | hash |
Memory only. More... | |
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 192 of file transaction.h.
CTransaction::CTransaction | ( | ) |
Construct a CTransaction that qualifies as IsNull()
For backward compatibility, the hash is initialized to 0.
TODO: remove the need for this default constructor entirely.
Definition at line 68 of file transaction.cpp.
|
explicit |
Convert a CMutableTransaction into a CTransaction.
Definition at line 71 of file transaction.cpp.
|
explicit |
Definition at line 74 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 235 of file transaction.h.
|
private |
|
inline |
|
inline |
unsigned int CTransaction::GetTotalSize | ( | ) | const |
Get the total transaction size in bytes.
Definition at line 92 of file transaction.cpp.
Amount CTransaction::GetValueOut | ( | ) | const |
Definition at line 78 of file transaction.cpp.
|
inline |
|
inline |
Definition at line 238 of file transaction.h.
|
inline |
std::string CTransaction::ToString | ( | ) | const |
Definition at line 96 of file transaction.cpp.
|
friend |
Definition at line 260 of file transaction.h.
|
friend |
Definition at line 256 of file transaction.h.
|
staticconstexpr |
Definition at line 195 of file transaction.h.
|
private |
Memory only.
Definition at line 213 of file transaction.h.
|
static |
Definition at line 199 of file transaction.h.
|
staticconstexpr |
Definition at line 199 of file transaction.h.
const uint32_t CTransaction::nLockTime |
Definition at line 209 of file transaction.h.
const int32_t CTransaction::nVersion |
Definition at line 208 of file transaction.h.
const std::vector<CTxIn> CTransaction::vin |
Definition at line 206 of file transaction.h.
const std::vector<CTxOut> CTransaction::vout |
Definition at line 207 of file transaction.h.