![]() |
Bitcoin Core
0.21.1
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 uint256 & | GetHash () const |
| const uint256 & | GetWitnessHash () const |
| 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 int32_t | nVersion |
| const uint32_t | nLockTime |
Static Public Attributes | |
| static const int32_t | CURRENT_VERSION =2 |
| static const int32_t | MAX_STANDARD_VERSION =2 |
Private Member Functions | |
| uint256 | ComputeHash () const |
| uint256 | ComputeWitnessHash () const |
Private Attributes | |
| const uint256 | hash |
| Memory only. More... | |
| const uint256 | 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 259 of file transaction.h.
| CTransaction::CTransaction | ( | ) |
Construct a CTransaction that qualifies as IsNull()
Definition at line 81 of file transaction.cpp.
|
explicit |
Convert a CMutableTransaction into a CTransaction.
Definition at line 82 of file transaction.cpp.
| CTransaction::CTransaction | ( | CMutableTransaction && | tx | ) |
|
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 305 of file transaction.h.
|
private |
Definition at line 67 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 97 of file transaction.cpp.
| CAmount CTransaction::GetValueOut | ( | ) | const |
Definition at line 85 of file transaction.cpp.
|
inline |
|
inline |
Definition at line 341 of file transaction.h.
|
inline |
|
inline |
Definition at line 307 of file transaction.h.
|
inline |
| std::string CTransaction::ToString | ( | ) | const |
|
friend |
Definition at line 334 of file transaction.h.
|
friend |
Definition at line 329 of file transaction.h.
|
static |
Definition at line 263 of file transaction.h.
|
private |
Memory only.
Definition at line 283 of file transaction.h.
|
private |
Definition at line 284 of file transaction.h.
|
static |
Definition at line 269 of file transaction.h.
| const uint32_t CTransaction::nLockTime |
Definition at line 279 of file transaction.h.
| const int32_t CTransaction::nVersion |
Definition at line 278 of file transaction.h.
| const std::vector<CTxIn> CTransaction::vin |
Definition at line 276 of file transaction.h.
| const std::vector<CTxOut> CTransaction::vout |
Definition at line 277 of file transaction.h.
1.8.8