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>
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 CWallet * | GetWallet () 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< uint256 > | GetConflicts () 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 uint256 & | GetHash () const |
bool | IsCoinBase () const |
Private Attributes | |
const CWallet * | pwallet |
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.
Constructor & Destructor Documentation
◆ CWalletTx() [1/2]
|
inline |
Definition at line 362 of file wallet.h.
References CMerkleTx::Init().
◆ CWalletTx() [2/2]
|
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()
|
inline |
Definition at line 470 of file wallet.h.
References MarkDirty(), and pwallet.
Referenced by CWallet::AddToWallet(), CWallet::CommitTransaction(), CWallet::CreateTransaction(), and CWallet::LoadToWallet().
◆ GetWallet()
|
inline |
Definition at line 476 of file wallet.h.
References pwallet.
Referenced by TransactionRecord::updateStatus().
◆ Init()
|
inline |
Definition at line 372 of file wallet.h.
References fAnonymizedCreditCached, fAvailableCreditCached, fAvailableWatchCreditCached, fChangeCached, fCreditCached, fDebitCached, fDenomConfCreditCached, fDenomUnconfCreditCached, fFromMe, fImmatureCreditCached, fImmatureWatchCreditCached, fInMempool, fTimeReceivedIsTxTime, fWatchCreditCached, fWatchDebitCached, mapValue, nAnonymizedCreditCached, nAvailableCreditCached, nAvailableWatchCreditCached, nChangeCached, nCreditCached, nDebitCached, nDenomConfCreditCached, nDenomUnconfCreditCached, nImmatureCreditCached, nImmatureWatchCreditCached, nOrderPos, nTimeReceived, nTimeSmart, nWatchCreditCached, nWatchDebitCached, pwallet, strFromAccount, and vOrderForm.
◆ IsFromMe()
|
inline |
Definition at line 496 of file wallet.h.
References GetDebit().
Referenced by CWallet::GetAddressBalances(), gettransaction(), IsTrusted(), ListTransactions(), and CWallet::SelectCoinsMinConf().
◆ MarkDirty()
|
inline |
make sure balances are recalculated
Definition at line 454 of file wallet.h.
References fAnonymizedCreditCached, fAvailableCreditCached, fAvailableWatchCreditCached, fChangeCached, fCreditCached, fDebitCached, fDenomConfCreditCached, fDenomUnconfCreditCached, fImmatureCreditCached, fImmatureWatchCreditCached, fWatchCreditCached, and fWatchDebitCached.
Referenced by CWallet::AddToWallet(), BindWallet(), and BOOST_FIXTURE_TEST_CASE().
◆ SerializationOp()
|
inline |
< Used to be vtxPrev
Definition at line 413 of file wallet.h.
References atoi64(), fFromMe, fTimeReceivedIsTxTime, CMerkleTx::Init(), mapValue, nOrderPos, nTimeReceived, nTimeSmart, ReadOrderPos(), READWRITE, strFromAccount, strprintf, vOrderForm, and WriteOrderPos().
Member Data Documentation
◆ ADD_SERIALIZE_METHODS
◆ fAnonymizedCreditCached
|
mutable |
Definition at line 340 of file wallet.h.
Referenced by GetAnonymizedCredit(), Init(), and MarkDirty().
◆ fAvailableCreditCached
|
mutable |
Definition at line 339 of file wallet.h.
Referenced by GetAvailableCredit(), Init(), and MarkDirty().
◆ fAvailableWatchCreditCached
|
mutable |
Definition at line 346 of file wallet.h.
Referenced by GetAvailableWatchOnlyCredit(), Init(), and MarkDirty().
◆ fChangeCached
|
mutable |
Definition at line 347 of file wallet.h.
Referenced by GetChange(), Init(), and MarkDirty().
◆ fCreditCached
|
mutable |
Definition at line 337 of file wallet.h.
Referenced by GetCredit(), Init(), and MarkDirty().
◆ fDebitCached
|
mutable |
Definition at line 336 of file wallet.h.
Referenced by GetDebit(), Init(), and MarkDirty().
◆ fDenomConfCreditCached
|
mutable |
Definition at line 342 of file wallet.h.
Referenced by GetDenominatedCredit(), Init(), and MarkDirty().
◆ 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
|
mutable |
Definition at line 338 of file wallet.h.
Referenced by GetImmatureCredit(), Init(), and MarkDirty().
◆ fImmatureWatchCreditCached
|
mutable |
Definition at line 345 of file wallet.h.
Referenced by GetImmatureWatchOnlyCredit(), Init(), and MarkDirty().
◆ 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
|
mutable |
Definition at line 344 of file wallet.h.
Referenced by GetCredit(), Init(), and MarkDirty().
◆ 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
|
mutable |
Definition at line 353 of file wallet.h.
Referenced by GetAnonymizedCredit(), and Init().
◆ nAvailableCreditCached
|
mutable |
Definition at line 352 of file wallet.h.
Referenced by GetAvailableCredit(), and Init().
◆ nAvailableWatchCreditCached
|
mutable |
Definition at line 359 of file wallet.h.
Referenced by GetAvailableWatchOnlyCredit(), and Init().
◆ nChangeCached
|
mutable |
Definition at line 360 of file wallet.h.
Referenced by GetChange(), and Init().
◆ nCreditCached
|
mutable |
Definition at line 350 of file wallet.h.
Referenced by GetCredit(), and Init().
◆ nDebitCached
|
mutable |
Definition at line 349 of file wallet.h.
Referenced by GetDebit(), and Init().
◆ nDenomConfCreditCached
|
mutable |
Definition at line 355 of file wallet.h.
Referenced by GetDenominatedCredit(), and Init().
◆ nDenomUnconfCreditCached
|
mutable |
Definition at line 354 of file wallet.h.
Referenced by GetDenominatedCredit(), and Init().
◆ nImmatureCreditCached
|
mutable |
Definition at line 351 of file wallet.h.
Referenced by GetImmatureCredit(), and Init().
◆ nImmatureWatchCreditCached
|
mutable |
Definition at line 358 of file wallet.h.
Referenced by GetImmatureWatchOnlyCredit(), and Init().
◆ nOrderPos
int64_t CWalletTx::nOrderPos |
position in ordered transaction list
Definition at line 332 of file wallet.h.
Referenced by CWallet::AddToWallet(), CWallet::CreateWalletFromFile(), Init(), CWallet::LoadToWallet(), CWallet::ReacceptWalletTransactions(), CWallet::ReorderTransactions(), SerializationOp(), and CWallet::SyncMetaData().
◆ nTimeReceived
unsigned int CWalletTx::nTimeReceived |
time received by this node
Definition at line 314 of file wallet.h.
Referenced by CWallet::AddToWallet(), CWallet::ComputeTimeSmart(), CWallet::CreateWalletFromFile(), GetTxTime(), Init(), CWallet::ReorderTransactions(), CWallet::ResendWalletTransactionsBefore(), SerializationOp(), TransactionRecord::updateStatus(), and WalletTxToJSON().
◆ 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
|
mutable |
Definition at line 357 of file wallet.h.
Referenced by GetCredit(), and Init().
◆ nWatchDebitCached
|
mutable |
Definition at line 356 of file wallet.h.
Referenced by GetDebit(), and Init().
◆ pwallet
|
private |
Definition at line 283 of file wallet.h.
Referenced by BindWallet(), GetAmounts(), GetAnonymizedCredit(), GetAvailableCredit(), GetAvailableWatchOnlyCredit(), GetChange(), GetConflicts(), GetCredit(), GetDebit(), GetDenominatedCredit(), GetImmatureCredit(), GetImmatureWatchOnlyCredit(), GetWallet(), Init(), IsTrusted(), and RelayWalletTransaction().
◆ strFromAccount
std::string CWalletTx::strFromAccount |
Definition at line 331 of file wallet.h.
Referenced by CWallet::CreateWalletFromFile(), GetAmounts(), CWallet::GetLegacyBalance(), Init(), sendfrom(), sendmany(), SerializationOp(), and CWallet::SyncMetaData().
◆ vOrderForm
std::vector<std::pair<std::string, std::string> > CWalletTx::vOrderForm |
Definition at line 312 of file wallet.h.
Referenced by CWallet::CreateWalletFromFile(), Init(), WalletModel::sendCoins(), SerializationOp(), CWallet::SyncMetaData(), and TransactionDesc::toHTML().
The documentation for this class was generated from the following files:
- src/wallet/wallet.h
- src/wallet/wallet.cpp