Anoncoin  0.9.4
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)
 
 CWalletTx (const CWallet *pwalletIn, const CMerkleTx &txIn)
 
 CWalletTx (const CWallet *pwalletIn, const CTransaction &txIn)
 
void Init (const CWallet *pwalletIn)
 
 IMPLEMENT_SERIALIZE (CWalletTx *pthis=const_cast< CWalletTx * >(this);if(fRead) pthis->Init(NULL);char fSpent=false;if(!fRead){pthis->mapValue["fromaccount"]=pthis->strFromAccount;WriteOrderPos(pthis->nOrderPos, pthis->mapValue);if(nTimeSmart) pthis->mapValue["timesmart"]=strprintf("%u", nTimeSmart);}nSerSize+=SerReadWrite(s,*(CMerkleTx *) this, nType, nVersion, ser_action);std::vector< CMerkleTx > vUnused;READWRITE(vUnused);READWRITE(mapValue);READWRITE(vOrderForm);READWRITE(fTimeReceivedIsTxTime);READWRITE(nTimeReceived);READWRITE(fFromMe);READWRITE(fSpent);if(fRead){pthis->strFromAccount=pthis->mapValue["fromaccount"];ReadOrderPos(pthis->nOrderPos, pthis->mapValue);pthis->nTimeSmart=mapValue.count("timesmart")?(unsigned int) atoi64(pthis->mapValue["timesmart"]):0;}pthis->mapValue.erase("fromaccount");pthis->mapValue.erase("version");pthis->mapValue.erase("spent");pthis->mapValue.erase("n");pthis->mapValue.erase("timesmart");) void MarkDirty()
 
void BindWallet (CWallet *pwalletIn)
 
int64_t GetDebit (const isminefilter &filter) const
 
int64_t GetCredit (const isminefilter &filter) const
 
int64_t GetImmatureCredit (bool fUseCache=true) const
 
int64_t GetAvailableCredit (bool fUseCache=true) const
 
int64_t GetImmatureWatchOnlyCredit (const bool &fUseCache=true) const
 
int64_t GetAvailableWatchOnlyCredit (const bool &fUseCache=true) const
 
int64_t GetChange () const
 
void GetAmounts (std::list< std::pair< CTxDestination, int64_t > > &listReceived, std::list< std::pair< CTxDestination, int64_t > > &listSent, int64_t &nFee, std::string &strSentAccount, const isminefilter &filter) const
 
void GetAccountAmounts (const std::string &strAccount, int64_t &nReceived, int64_t &nSent, int64_t &nFee, const isminefilter &filter) const
 
bool IsFromMe (const isminefilter &filter) const
 
bool IsTrusted () const
 
bool WriteToDisk ()
 
int64_t GetTxTime () const
 
int GetRequestCount () const
 
void RelayWalletTransaction ()
 
std::set< uint256GetConflicts () const
 
- Public Member Functions inherited from CMerkleTx
 CMerkleTx ()
 
 CMerkleTx (const CTransaction &txIn)
 
void Init ()
 
 IMPLEMENT_SERIALIZE (nSerSize+=SerReadWrite(s,*(CTransaction *) this, nType, nVersion, ser_action);nVersion=this->nVersion;READWRITE(hashBlock);READWRITE(vMerkleBranch);READWRITE(nIndex);) int SetMerkleBranch(const CBlock *pblock
 
int GetDepthInMainChain (CBlockIndex *&pindexRet) const
 
int GetDepthInMainChain () const
 
bool IsInMainChain () const
 
int GetBlocksToMaturity () const
 
bool AcceptToMemoryPool (bool fLimitFree=true)
 
- Public Member Functions inherited from CTransaction
 CTransaction ()
 
 IMPLEMENT_SERIALIZE (READWRITE(this->nVersion);nVersion=this->nVersion;READWRITE(vin);READWRITE(vout);READWRITE(nLockTime);) void SetNull()
 
bool IsNull () const
 
uint256 GetHash () const
 
bool IsNewerThan (const CTransaction &old) const
 
int64_t GetValueOut () const
 
double ComputePriority (double dPriorityInputs, unsigned int nTxSize=0) const
 
bool IsCoinBase () const
 
std::string ToString () const
 
void print () const
 

Public Attributes

mapValue_t mapValue
 
std::vector< std::pair< std::string, std::string > > vOrderForm
 
unsigned int fTimeReceivedIsTxTime
 
unsigned int nTimeReceived
 
unsigned int nTimeSmart
 
char fFromMe
 
std::string strFromAccount
 
int64_t nOrderPos
 
bool fDebitCached
 
bool fCreditCached
 
bool fImmatureCreditCached
 
bool fAvailableCreditCached
 
bool fWatchDebitCached
 
bool fWatchCreditCached
 
bool fImmatureWatchCreditCached
 
bool fAvailableWatchCreditCached
 
bool fChangeCached
 
int64_t nDebitCached
 
int64_t nCreditCached
 
int64_t nImmatureCreditCached
 
int64_t nAvailableCreditCached
 
int64_t nWatchDebitCached
 
int64_t nWatchCreditCached
 
int64_t nImmatureWatchCreditCached
 
int64_t nAvailableWatchCreditCached
 
int64_t nChangeCached
 
- Public Attributes inherited from CMerkleTx
uint256 hashBlock
 
std::vector< uint256vMerkleBranch
 
int nIndex
 
bool fMerkleVerified
 
- Public Attributes inherited from CTransaction
int nVersion
 
std::vector< CTxInvin
 
std::vector< CTxOutvout
 
unsigned int nLockTime
 

Private Attributes

const CWalletpwallet
 

Additional Inherited Members

- Static Public Attributes inherited from CTransaction
static int64_t nMinTxFee = 100000
 Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) More...
 
static int64_t nMinRelayTxFee = 100000
 Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) More...
 
static const int CURRENT_VERSION =1
 

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

Constructor & Destructor Documentation

CWalletTx::CWalletTx ( )
inline

Definition at line 499 of file wallet.h.

CWalletTx::CWalletTx ( const CWallet pwalletIn)
inline

Definition at line 504 of file wallet.h.

CWalletTx::CWalletTx ( const CWallet pwalletIn,
const CMerkleTx txIn 
)
inline

Definition at line 509 of file wallet.h.

CWalletTx::CWalletTx ( const CWallet pwalletIn,
const CTransaction txIn 
)
inline

Definition at line 514 of file wallet.h.

Member Function Documentation

void CWalletTx::BindWallet ( CWallet pwalletIn)
inline

Definition at line 606 of file wallet.h.

Here is the caller graph for this function:

void CWalletTx::GetAccountAmounts ( const std::string &  strAccount,
int64_t &  nReceived,
int64_t &  nSent,
int64_t &  nFee,
const isminefilter filter 
) const

Definition at line 842 of file wallet.cpp.

Here is the caller graph for this function:

void CWalletTx::GetAmounts ( std::list< std::pair< CTxDestination, int64_t > > &  listReceived,
std::list< std::pair< CTxDestination, int64_t > > &  listSent,
int64_t &  nFee,
std::string &  strSentAccount,
const isminefilter filter 
) const

Definition at line 789 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWalletTx::GetAvailableCredit ( bool  fUseCache = true) const
inline

Definition at line 691 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWalletTx::GetAvailableWatchOnlyCredit ( const bool &  fUseCache = true) const
inline

Definition at line 735 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWalletTx::GetChange ( ) const
inline

Definition at line 764 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

set< uint256 > CWalletTx::GetConflicts ( ) const

Definition at line 958 of file wallet.cpp.

Here is the caller graph for this function:

int64_t CWalletTx::GetCredit ( const isminefilter filter) const
inline

Definition at line 644 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWalletTx::GetDebit ( const isminefilter filter) const
inline

Definition at line 613 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWalletTx::GetImmatureCredit ( bool  fUseCache = true) const
inline

Definition at line 677 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWalletTx::GetImmatureWatchOnlyCredit ( const bool &  fUseCache = true) const
inline

Definition at line 721 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int CWalletTx::GetRequestCount ( ) const

Definition at line 750 of file wallet.cpp.

Here is the caller graph for this function:

int64_t CWalletTx::GetTxTime ( ) const

Definition at line 744 of file wallet.cpp.

Here is the caller graph for this function:

CWalletTx::IMPLEMENT_SERIALIZE ( CWalletTx pthis = const_cast<CWalletTx*>(this); if (fRead) pthis->Init(NULL); char fSpent = false; if (!fRead) { pthis->mapValue["fromaccount"] = pthis->strFromAccount; WriteOrderPos(pthis->nOrderPos, pthis->mapValue); if (nTimeSmart) pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart); } nSerSize += SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion,ser_action); std::vector<CMerkleTx> vUnused;  READWRITE(vUnused); READWRITE(mapValue); READWRITE(vOrderForm); READWRITE(fTimeReceivedIsTxTime); READWRITE(nTimeReceived); READWRITE(fFromMe); READWRITE(fSpent); if (fRead) { pthis->strFromAccount = pthis->mapValue["fromaccount"]; ReadOrderPos(pthis->nOrderPos, pthis->mapValue); pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0; } pthis->mapValue.erase("fromaccount"); pthis->mapValue.erase("version"); pthis->mapValue.erase("spent"); pthis->mapValue.erase("n"); pthis->mapValue.erase("timesmart");)
inline

Definition at line 551 of file wallet.h.

void CWalletTx::Init ( const CWallet pwalletIn)
inline

Definition at line 519 of file wallet.h.

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

Definition at line 779 of file wallet.h.

Here is the caller graph for this function:

bool CWalletTx::IsTrusted ( ) const
inline

Definition at line 784 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWalletTx::RelayWalletTransaction ( )

Definition at line 946 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWalletTx::WriteToDisk ( )

Definition at line 878 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool CWalletTx::fAvailableCreditCached
mutable

Definition at line 483 of file wallet.h.

bool CWalletTx::fAvailableWatchCreditCached
mutable

Definition at line 487 of file wallet.h.

bool CWalletTx::fChangeCached
mutable

Definition at line 488 of file wallet.h.

bool CWalletTx::fCreditCached
mutable

Definition at line 481 of file wallet.h.

bool CWalletTx::fDebitCached
mutable

Definition at line 480 of file wallet.h.

char CWalletTx::fFromMe

Definition at line 475 of file wallet.h.

bool CWalletTx::fImmatureCreditCached
mutable

Definition at line 482 of file wallet.h.

bool CWalletTx::fImmatureWatchCreditCached
mutable

Definition at line 486 of file wallet.h.

unsigned int CWalletTx::fTimeReceivedIsTxTime

Definition at line 472 of file wallet.h.

bool CWalletTx::fWatchCreditCached
mutable

Definition at line 485 of file wallet.h.

bool CWalletTx::fWatchDebitCached
mutable

Definition at line 484 of file wallet.h.

mapValue_t CWalletTx::mapValue

Definition at line 470 of file wallet.h.

int64_t CWalletTx::nAvailableCreditCached
mutable

Definition at line 492 of file wallet.h.

int64_t CWalletTx::nAvailableWatchCreditCached
mutable

Definition at line 496 of file wallet.h.

int64_t CWalletTx::nChangeCached
mutable

Definition at line 497 of file wallet.h.

int64_t CWalletTx::nCreditCached
mutable

Definition at line 490 of file wallet.h.

int64_t CWalletTx::nDebitCached
mutable

Definition at line 489 of file wallet.h.

int64_t CWalletTx::nImmatureCreditCached
mutable

Definition at line 491 of file wallet.h.

int64_t CWalletTx::nImmatureWatchCreditCached
mutable

Definition at line 495 of file wallet.h.

int64_t CWalletTx::nOrderPos

Definition at line 477 of file wallet.h.

unsigned int CWalletTx::nTimeReceived

Definition at line 473 of file wallet.h.

unsigned int CWalletTx::nTimeSmart

Definition at line 474 of file wallet.h.

int64_t CWalletTx::nWatchCreditCached
mutable

Definition at line 494 of file wallet.h.

int64_t CWalletTx::nWatchDebitCached
mutable

Definition at line 493 of file wallet.h.

const CWallet* CWalletTx::pwallet
private

Definition at line 467 of file wallet.h.

std::string CWalletTx::strFromAccount

Definition at line 476 of file wallet.h.

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

Definition at line 471 of file wallet.h.


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