![]() |
Bitcoin Core
26.1.0
P2P Digital Currency
|
A transaction with a bunch of additional info that only the owner cares about. More...
#include <transaction.h>
Public Types | |
| enum | AmountType { DEBIT, CREDIT, IMMATURE_CREDIT, AVAILABLE_CREDIT, AMOUNTTYPE_ENUM_ELEMENTS } |
Public Member Functions | |
| CWalletTx (CTransactionRef tx, const TxState &state) | |
| void | Init () |
| template<typename Stream > | |
| void | Serialize (Stream &s) const |
| template<typename Stream > | |
| void | Unserialize (Stream &s) |
| void | SetTx (CTransactionRef arg) |
| void | MarkDirty () |
| make sure balances are recalculated More... | |
| bool | IsEquivalentTo (const CWalletTx &tx) const |
| True if only scriptSigs are different. More... | |
| bool | InMempool () const |
| int64_t | GetTxTime () const |
| template<typename T > | |
| const T * | state () const |
| template<typename T > | |
| T * | state () |
| bool | isAbandoned () const |
| bool | isConflicted () const |
| bool | isInactive () const |
| bool | isUnconfirmed () const |
| bool | isConfirmed () const |
| const uint256 & | GetHash () const |
| const uint256 & | GetWitnessHash () const |
| bool | IsCoinBase () const |
| void | CopyFrom (const CWalletTx &) |
Public Attributes | |
| mapValue_t | mapValue |
| Key/value map with information about the transaction. More... | |
| std::vector< std::pair< std::string, std::string > > | vOrderForm |
| unsigned int | fTimeReceivedIsTxTime |
| unsigned int | nTimeReceived |
| time received by this node More... | |
| unsigned int | nTimeSmart |
| Stable timestamp that never changes, and reflects the order a transaction was added to the wallet. More... | |
| bool | fFromMe |
| From me flag is set to 1 for transactions that were created by the wallet on this bitcoin node, and set to 0 for transactions that were created externally and came in through the network or sendrawtransaction RPC. More... | |
| int64_t | nOrderPos |
| position in ordered transaction list More... | |
| std::multimap< int64_t, CWalletTx * >::const_iterator | m_it_wtxOrdered |
| CachableAmount | m_amounts [AMOUNTTYPE_ENUM_ELEMENTS] |
| bool | m_is_cache_empty {true} |
| This flag is true if all m_amounts caches are empty. More... | |
| bool | fChangeCached |
| CAmount | nChangeCached |
| CTransactionRef | tx |
| TxState | m_state |
Private Member Functions | |
| CWalletTx (const CWalletTx &)=default | |
| CWalletTx & | operator= (const CWalletTx &)=default |
A transaction with a bunch of additional info that only the owner cares about.
It includes any unrecorded transactions needed to link it back to the block chain.
Definition at line 171 of file transaction.h.
| Enumerator | |
|---|---|
| DEBIT | |
| CREDIT | |
| IMMATURE_CREDIT | |
| AVAILABLE_CREDIT | |
| AMOUNTTYPE_ENUM_ELEMENTS | |
Definition at line 223 of file transaction.h.
|
inline |
|
privatedefault |
| void wallet::CWalletTx::CopyFrom | ( | const CWalletTx & | _tx | ) |
Definition at line 28 of file transaction.cpp.
|
inline |
| int64_t wallet::CWalletTx::GetTxTime | ( | ) | const |
|
inline |
Definition at line 334 of file transaction.h.
|
inline |
| bool wallet::CWalletTx::InMempool | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
| bool wallet::CWalletTx::IsEquivalentTo | ( | const CWalletTx & | tx | ) | const |
True if only scriptSigs are different.
Definition at line 8 of file transaction.cpp.
|
inline |
|
inline |
|
inline |
make sure balances are recalculated
Definition at line 308 of file transaction.h.
|
inline |
< Used to be vMerkleBranch
< Used to be vtxPrev
< Used to be fSpent
Definition at line 257 of file transaction.h.
|
inline |
|
inline |
|
inline |
Definition at line 326 of file transaction.h.
|
inline |
< Used to be vMerkleBranch
< Used to be vtxPrev
Used to be fSpent
Definition at line 278 of file transaction.h.
|
mutable |
Definition at line 232 of file transaction.h.
| bool wallet::CWalletTx::fFromMe |
From me flag is set to 1 for transactions that were created by the wallet on this bitcoin node, and set to 0 for transactions that were created externally and came in through the network or sendrawtransaction RPC.
Definition at line 218 of file transaction.h.
| unsigned int wallet::CWalletTx::fTimeReceivedIsTxTime |
Definition at line 201 of file transaction.h.
|
mutable |
Definition at line 224 of file transaction.h.
|
mutable |
This flag is true if all m_amounts caches are empty.
This is particularly useful in places where MarkDirty is conditionally called and the condition can be expensive and thus can be skipped if the flag is true. See MarkDestinationsDirty.
Definition at line 231 of file transaction.h.
| std::multimap<int64_t, CWalletTx*>::const_iterator wallet::CWalletTx::m_it_wtxOrdered |
Definition at line 220 of file transaction.h.
| TxState wallet::CWalletTx::m_state |
Definition at line 254 of file transaction.h.
| mapValue_t wallet::CWalletTx::mapValue |
Key/value map with information about the transaction.
The following keys can be read and written through the map and are serialized in the wallet database:
"comment", "to" - comment strings provided to sendtoaddress,
and sendmany wallet RPCs
"replaces_txid" - txid (as HexStr) of transaction replaced by
bumpfee on transaction created by bumpfee
"replaced_by_txid" - txid (as HexStr) of transaction created by
bumpfee on transaction replaced by bumpfee
"from", "message" - obsolete fields that could be set in UI prior to
2011 (removed in commit 4d9b223)
The following keys are serialized in the wallet database, but shouldn't be read or written through the map (they will be temporarily added and removed from the map during serialization):
"fromaccount" - serialized strFromAccount value
"n" - serialized nOrderPos value
"timesmart" - serialized nTimeSmart value
"spent" - serialized vfSpent value that existed prior to
2014 (removed in commit 93a18a3)
Definition at line 199 of file transaction.h.
|
mutable |
Definition at line 233 of file transaction.h.
| int64_t wallet::CWalletTx::nOrderPos |
position in ordered transaction list
Definition at line 219 of file transaction.h.
| unsigned int wallet::CWalletTx::nTimeReceived |
time received by this node
Definition at line 202 of file transaction.h.
| unsigned int wallet::CWalletTx::nTimeSmart |
Stable timestamp that never changes, and reflects the order a transaction was added to the wallet.
Timestamp is based on the block time for a transaction added as part of a block, or else the time when the transaction was received if it wasn't part of a block, with the timestamp adjusted in both cases so timestamp order matches the order transactions were added to the wallet. More details can be found in CWallet::ComputeTimeSmart().
Definition at line 212 of file transaction.h.
| CTransactionRef wallet::CWalletTx::tx |
Definition at line 253 of file transaction.h.
| std::vector<std::pair<std::string, std::string> > wallet::CWalletTx::vOrderForm |
Definition at line 200 of file transaction.h.
1.8.14