Raven Core  3.0.0
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
CWalletTx Class Reference

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

#include <wallet.h>

Inheritance diagram for CWalletTx:
[legend]
Collaboration diagram for CWalletTx:
[legend]

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)
 
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
 
void GetAmounts (std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter) const
 
void GetAmounts (std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter, std::list< CAssetOutputEntry > &assetsReceived, std::list< CAssetOutputEntry > &assetsSent) const
 
bool IsFromMe (const isminefilter &filter) const
 
bool IsEquivalentTo (const CWalletTx &tx) const
 
bool InMempool () const
 
bool IsTrusted () const
 
int64_t GetTxTime () const
 
int GetRequestCount () const
 
bool RelayWalletTransaction (CConnman *connman)
 
std::set< uint256GetConflicts () const
 
- Public Member Functions inherited from CMerkleTx
 CMerkleTx ()
 
 CMerkleTx (CTransactionRef arg)
 
 operator const CTransaction & () const
 Helper conversion operator to allow passing CMerkleTx where CTransaction is expected. More...
 
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
 
int GetBlocksToMaturity () const
 
bool AcceptToMemoryPool (const CAmount &nAbsurdFee, CValidationState &state)
 Pass this transaction to the mempool. More...
 
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 raven 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...
 
bool fDebitCached
 
bool fCreditCached
 
bool fImmatureCreditCached
 
bool fAvailableCreditCached
 
bool fWatchDebitCached
 
bool fWatchCreditCached
 
bool fImmatureWatchCreditCached
 
bool fAvailableWatchCreditCached
 
bool fChangeCached
 
CAmount nDebitCached
 
CAmount nCreditCached
 
CAmount nImmatureCreditCached
 
CAmount nAvailableCreditCached
 
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 285 of file wallet.h.

Constructor & Destructor Documentation

◆ CWalletTx() [1/2]

CWalletTx::CWalletTx ( )
inline

Definition at line 359 of file wallet.h.

◆ CWalletTx() [2/2]

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

Definition at line 364 of file wallet.h.

Member Function Documentation

◆ BindWallet()

void CWalletTx::BindWallet ( CWallet pwalletIn)
inline

Definition at line 457 of file wallet.h.

Here is the caller graph for this function:

◆ Init()

void CWalletTx::Init ( const CWallet pwalletIn)
inline

Definition at line 369 of file wallet.h.

◆ IsFromMe()

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

Definition at line 478 of file wallet.h.

Here is the caller graph for this function:

◆ MarkDirty()

void CWalletTx::MarkDirty ( )
inline

make sure balances are recalculated

Definition at line 444 of file wallet.h.

Here is the caller graph for this function:

◆ SerializationOp()

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

< Used to be vtxPrev

Definition at line 403 of file wallet.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CWalletTx::ADD_SERIALIZE_METHODS

Definition at line 400 of file wallet.h.

◆ fAvailableCreditCached

bool CWalletTx::fAvailableCreditCached
mutable

Definition at line 343 of file wallet.h.

◆ fAvailableWatchCreditCached

bool CWalletTx::fAvailableWatchCreditCached
mutable

Definition at line 347 of file wallet.h.

◆ fChangeCached

bool CWalletTx::fChangeCached
mutable

Definition at line 348 of file wallet.h.

◆ fCreditCached

bool CWalletTx::fCreditCached
mutable

Definition at line 341 of file wallet.h.

◆ fDebitCached

bool CWalletTx::fDebitCached
mutable

Definition at line 340 of file wallet.h.

◆ fFromMe

char CWalletTx::fFromMe

From me flag is set to 1 for transactions that were created by the wallet on this raven node, and set to 0 for transactions that were created externally and came in through the network or sendrawtransaction RPC.

Definition at line 335 of file wallet.h.

◆ fImmatureCreditCached

bool CWalletTx::fImmatureCreditCached
mutable

Definition at line 342 of file wallet.h.

◆ fImmatureWatchCreditCached

bool CWalletTx::fImmatureWatchCreditCached
mutable

Definition at line 346 of file wallet.h.

◆ fTimeReceivedIsTxTime

unsigned int CWalletTx::fTimeReceivedIsTxTime

Definition at line 318 of file wallet.h.

◆ fWatchCreditCached

bool CWalletTx::fWatchCreditCached
mutable

Definition at line 345 of file wallet.h.

◆ fWatchDebitCached

bool CWalletTx::fWatchDebitCached
mutable

Definition at line 344 of file wallet.h.

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

◆ nAvailableCreditCached

CAmount CWalletTx::nAvailableCreditCached
mutable

Definition at line 352 of file wallet.h.

◆ nAvailableWatchCreditCached

CAmount CWalletTx::nAvailableWatchCreditCached
mutable

Definition at line 356 of file wallet.h.

◆ nChangeCached

CAmount CWalletTx::nChangeCached
mutable

Definition at line 357 of file wallet.h.

◆ nCreditCached

CAmount CWalletTx::nCreditCached
mutable

Definition at line 350 of file wallet.h.

◆ nDebitCached

CAmount CWalletTx::nDebitCached
mutable

Definition at line 349 of file wallet.h.

◆ nImmatureCreditCached

CAmount CWalletTx::nImmatureCreditCached
mutable

Definition at line 351 of file wallet.h.

◆ nImmatureWatchCreditCached

CAmount CWalletTx::nImmatureWatchCreditCached
mutable

Definition at line 355 of file wallet.h.

◆ nOrderPos

int64_t CWalletTx::nOrderPos

position in ordered transaction list

Definition at line 337 of file wallet.h.

◆ nTimeReceived

unsigned int CWalletTx::nTimeReceived

time received by this node

Definition at line 319 of file wallet.h.

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

◆ nWatchCreditCached

CAmount CWalletTx::nWatchCreditCached
mutable

Definition at line 354 of file wallet.h.

◆ nWatchDebitCached

CAmount CWalletTx::nWatchDebitCached
mutable

Definition at line 353 of file wallet.h.

◆ pwallet

const CWallet* CWalletTx::pwallet
private

Definition at line 288 of file wallet.h.

◆ strFromAccount

std::string CWalletTx::strFromAccount

Definition at line 336 of file wallet.h.

◆ vOrderForm

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

Definition at line 317 of file wallet.h.


The documentation for this class was generated from the following files: