Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

A transaction with a bunch of additional info that only the owner cares about. More...

#include <wallet.h>

+ Inheritance diagram for CWalletTx:
+ Collaboration diagram for CWalletTx:

Public Member Functions

 CWalletTx ()
 
 CWalletTx (const CWallet *pwalletIn, CTransactionRef arg)
 
void Init (const CWallet *pwalletIn)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action)
 
void MarkDirty ()
 make sure balances are recalculated More...
 
void BindWallet (CWallet *pwalletIn)
 
const CWalletGetWallet () const
 
CAmount GetDebit (const isminefilter &filter) const
 filter decides which addresses will count towards the debit More...
 
CAmount GetCredit (const isminefilter &filter) const
 
CAmount GetImmatureCredit (bool fUseCache=true) const
 
CAmount GetAvailableCredit (bool fUseCache=true) const
 
CAmount GetImmatureWatchOnlyCredit (const bool fUseCache=true) const
 
CAmount GetAvailableWatchOnlyCredit (const bool fUseCache=true) const
 
CAmount GetChange () const
 
CAmount GetAnonymizedCredit (const CCoinControl *coinControl=nullptr) const
 
CAmount GetDenominatedCredit (bool unconfirmed, bool fUseCache=true) const
 
void GetAmounts (std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter) const
 
bool IsFromMe (const isminefilter &filter) const
 
bool IsEquivalentTo (const CWalletTx &tx) const
 
bool InMempool () const
 
bool IsTrusted () const
 
int64_t GetTxTime () const
 
bool RelayWalletTransaction (CConnman *connman)
 
bool AcceptToMemoryPool (const CAmount &nAbsurdFee, CValidationState &state)
 Pass this transaction to the mempool. More...
 
std::set< uint256GetConflicts () const
 
- Public Member Functions inherited from CMerkleTx
 CMerkleTx ()
 
 CMerkleTx (CTransactionRef arg)
 
void Init ()
 
void SetTx (CTransactionRef arg)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action)
 
void SetMerkleBranch (const CBlockIndex *pIndex, int posInBlock)
 
int GetDepthInMainChain (const CBlockIndex *&pindexRet) const
 Return depth of transaction in blockchain: <0 : conflicts with a transaction this deep in the blockchain 0 : in memory pool, waiting to be included in a block >=1 : this many blocks deep in the main chain. More...
 
int GetDepthInMainChain () const
 
bool IsInMainChain () const
 
bool IsLockedByInstantSend () const
 
bool IsChainLocked () const
 
int GetBlocksToMaturity () const
 
bool hashUnset () const
 
bool isAbandoned () const
 
void setAbandoned ()
 
const uint256GetHash () const
 
bool IsCoinBase () const
 

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...
 
char 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...
 
std::string strFromAccount
 
int64_t nOrderPos
 position in ordered transaction list More...
 
std::multimap< int64_t, std::pair< CWalletTx *, CAccountingEntry * > >::const_iterator m_it_wtxOrdered
 
bool fDebitCached
 
bool fCreditCached
 
bool fImmatureCreditCached
 
bool fAvailableCreditCached
 
bool fAnonymizedCreditCached
 
bool fDenomUnconfCreditCached
 
bool fDenomConfCreditCached
 
bool fWatchDebitCached
 
bool fWatchCreditCached
 
bool fImmatureWatchCreditCached
 
bool fAvailableWatchCreditCached
 
bool fChangeCached
 
bool fInMempool
 
CAmount nDebitCached
 
CAmount nCreditCached
 
CAmount nImmatureCreditCached
 
CAmount nAvailableCreditCached
 
CAmount nAnonymizedCreditCached
 
CAmount nDenomUnconfCreditCached
 
CAmount nDenomConfCreditCached
 
CAmount nWatchDebitCached
 
CAmount nWatchCreditCached
 
CAmount nImmatureWatchCreditCached
 
CAmount nAvailableWatchCreditCached
 
CAmount nChangeCached
 
 ADD_SERIALIZE_METHODS
 
- Public Attributes inherited from CMerkleTx
CTransactionRef tx
 
uint256 hashBlock
 
int nIndex
 
 ADD_SERIALIZE_METHODS
 

Private Attributes

const CWalletpwallet
 

Detailed Description

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 280 of file wallet.h.

Constructor & Destructor Documentation

◆ CWalletTx() [1/2]

CWalletTx::CWalletTx ( )
inline

Definition at line 362 of file wallet.h.

References CMerkleTx::Init().

◆ CWalletTx() [2/2]

CWalletTx::CWalletTx ( const CWallet pwalletIn,
CTransactionRef  arg 
)
inline

Definition at line 367 of file wallet.h.

References CMerkleTx::Init().

Member Function Documentation

◆ AcceptToMemoryPool()

bool CWalletTx::AcceptToMemoryPool ( const CAmount nAbsurdFee,
CValidationState state 
)

Pass this transaction to the mempool.

Fails if absolute fee exceeds absurd fee.

Definition at line 5554 of file wallet.cpp.

References CTxMemPool::exists(), fInMempool, mempool, and CMerkleTx::tx.

Referenced by CWallet::CommitTransaction(), CWallet::ReacceptWalletTransactions(), and RelayWalletTransaction().

◆ BindWallet()

void CWalletTx::BindWallet ( CWallet pwalletIn)
inline

◆ GetWallet()

const CWallet* CWalletTx::GetWallet ( ) const
inline

Definition at line 476 of file wallet.h.

References pwallet.

Referenced by TransactionRecord::updateStatus().

◆ Init()

◆ IsFromMe()

bool CWalletTx::IsFromMe ( const isminefilter filter) const
inline

◆ MarkDirty()

◆ SerializationOp()

template<typename Stream , typename Operation >
void CWalletTx::SerializationOp ( Stream &  s,
Operation  ser_action 
)
inline

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CWalletTx::ADD_SERIALIZE_METHODS

Definition at line 410 of file wallet.h.

◆ fAnonymizedCreditCached

bool CWalletTx::fAnonymizedCreditCached
mutable

Definition at line 340 of file wallet.h.

Referenced by GetAnonymizedCredit(), Init(), and MarkDirty().

◆ fAvailableCreditCached

bool CWalletTx::fAvailableCreditCached
mutable

Definition at line 339 of file wallet.h.

Referenced by GetAvailableCredit(), Init(), and MarkDirty().

◆ fAvailableWatchCreditCached

bool CWalletTx::fAvailableWatchCreditCached
mutable

Definition at line 346 of file wallet.h.

Referenced by GetAvailableWatchOnlyCredit(), Init(), and MarkDirty().

◆ fChangeCached

bool CWalletTx::fChangeCached
mutable

Definition at line 347 of file wallet.h.

Referenced by GetChange(), Init(), and MarkDirty().

◆ fCreditCached

bool CWalletTx::fCreditCached
mutable

Definition at line 337 of file wallet.h.

Referenced by GetCredit(), Init(), and MarkDirty().

◆ fDebitCached

bool CWalletTx::fDebitCached
mutable

Definition at line 336 of file wallet.h.

Referenced by GetDebit(), Init(), and MarkDirty().

◆ fDenomConfCreditCached

bool CWalletTx::fDenomConfCreditCached
mutable

Definition at line 342 of file wallet.h.

Referenced by GetDenominatedCredit(), Init(), and MarkDirty().

◆ fDenomUnconfCreditCached

bool CWalletTx::fDenomUnconfCreditCached
mutable

Definition at line 341 of file wallet.h.

Referenced by GetDenominatedCredit(), Init(), and MarkDirty().

◆ fFromMe

char 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 330 of file wallet.h.

Referenced by CWallet::AddToWallet(), CWallet::CreateTransaction(), CWallet::CreateWalletFromFile(), Init(), SerializationOp(), and CWallet::SyncMetaData().

◆ fImmatureCreditCached

bool CWalletTx::fImmatureCreditCached
mutable

Definition at line 338 of file wallet.h.

Referenced by GetImmatureCredit(), Init(), and MarkDirty().

◆ fImmatureWatchCreditCached

bool CWalletTx::fImmatureWatchCreditCached
mutable

Definition at line 345 of file wallet.h.

Referenced by GetImmatureWatchOnlyCredit(), Init(), and MarkDirty().

◆ fInMempool

bool CWalletTx::fInMempool
mutable

Definition at line 348 of file wallet.h.

Referenced by AcceptToMemoryPool(), Init(), and InMempool().

◆ fTimeReceivedIsTxTime

unsigned int CWalletTx::fTimeReceivedIsTxTime

Definition at line 313 of file wallet.h.

Referenced by CWallet::CreateTransaction(), Init(), and SerializationOp().

◆ fWatchCreditCached

bool CWalletTx::fWatchCreditCached
mutable

Definition at line 344 of file wallet.h.

Referenced by GetCredit(), Init(), and MarkDirty().

◆ fWatchDebitCached

bool CWalletTx::fWatchDebitCached
mutable

Definition at line 343 of file wallet.h.

Referenced by GetDebit(), Init(), and MarkDirty().

◆ m_it_wtxOrdered

std::multimap<int64_t, std::pair<CWalletTx*, CAccountingEntry*> >::const_iterator CWalletTx::m_it_wtxOrdered

Definition at line 333 of file wallet.h.

Referenced by CWallet::AddToWallet(), and CWallet::LoadToWallet().

◆ mapValue

mapValue_t 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,
                    sendfrom, 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 311 of file wallet.h.

Referenced by BOOST_AUTO_TEST_CASE(), CWallet::CreateTransaction(), CWallet::CreateWalletFromFile(), TransactionRecord::decomposeTransaction(), Init(), ListTransactions(), sendfrom(), sendmany(), sendtoaddress(), SerializationOp(), CWallet::SyncMetaData(), TransactionDesc::toHTML(), and WalletTxToJSON().

◆ nAnonymizedCreditCached

CAmount CWalletTx::nAnonymizedCreditCached
mutable

Definition at line 353 of file wallet.h.

Referenced by GetAnonymizedCredit(), and Init().

◆ nAvailableCreditCached

CAmount CWalletTx::nAvailableCreditCached
mutable

Definition at line 352 of file wallet.h.

Referenced by GetAvailableCredit(), and Init().

◆ nAvailableWatchCreditCached

CAmount CWalletTx::nAvailableWatchCreditCached
mutable

Definition at line 359 of file wallet.h.

Referenced by GetAvailableWatchOnlyCredit(), and Init().

◆ nChangeCached

CAmount CWalletTx::nChangeCached
mutable

Definition at line 360 of file wallet.h.

Referenced by GetChange(), and Init().

◆ nCreditCached

CAmount CWalletTx::nCreditCached
mutable

Definition at line 350 of file wallet.h.

Referenced by GetCredit(), and Init().

◆ nDebitCached

CAmount CWalletTx::nDebitCached
mutable

Definition at line 349 of file wallet.h.

Referenced by GetDebit(), and Init().

◆ nDenomConfCreditCached

CAmount CWalletTx::nDenomConfCreditCached
mutable

Definition at line 355 of file wallet.h.

Referenced by GetDenominatedCredit(), and Init().

◆ nDenomUnconfCreditCached

CAmount CWalletTx::nDenomUnconfCreditCached
mutable

Definition at line 354 of file wallet.h.

Referenced by GetDenominatedCredit(), and Init().

◆ nImmatureCreditCached

CAmount CWalletTx::nImmatureCreditCached
mutable

Definition at line 351 of file wallet.h.

Referenced by GetImmatureCredit(), and Init().

◆ nImmatureWatchCreditCached

CAmount CWalletTx::nImmatureWatchCreditCached
mutable

Definition at line 358 of file wallet.h.

Referenced by GetImmatureWatchOnlyCredit(), and Init().

◆ nOrderPos

◆ nTimeReceived

◆ nTimeSmart

unsigned int 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 324 of file wallet.h.

Referenced by CWallet::AddToWallet(), CWallet::ComputeTimeSmart(), CWallet::CreateWalletFromFile(), GetTxTime(), Init(), SerializationOp(), and CWallet::SyncMetaData().

◆ nWatchCreditCached

CAmount CWalletTx::nWatchCreditCached
mutable

Definition at line 357 of file wallet.h.

Referenced by GetCredit(), and Init().

◆ nWatchDebitCached

CAmount CWalletTx::nWatchDebitCached
mutable

Definition at line 356 of file wallet.h.

Referenced by GetDebit(), and Init().

◆ pwallet

◆ strFromAccount

std::string CWalletTx::strFromAccount

◆ vOrderForm

std::vector<std::pair<std::string, std::string> > CWalletTx::vOrderForm

The documentation for this class was generated from the following files:
Released under the MIT license