![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
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) | |
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 |
int64_t | GetCredit (bool fUseCache=true) const |
int64_t | GetImmatureCredit (bool fUseCache=true) const |
int64_t | GetAvailableCredit (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 |
void | GetAccountAmounts (const std::string &strAccount, int64_t &nReceived, int64_t &nSent, int64_t &nFee) const |
bool | IsFromMe () const |
bool | IsTrusted () const |
bool | WriteToDisk () |
int64_t | GetTxTime () const |
int | GetRequestCount () const |
void | RelayWalletTransaction () |
std::set< uint256 > | GetConflicts () const |
![]() | |
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) |
![]() | |
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 | fChangeCached |
int64_t | nDebitCached |
int64_t | nCreditCached |
int64_t | nImmatureCreditCached |
int64_t | nAvailableCreditCached |
int64_t | nChangeCached |
![]() | |
uint256 | hashBlock |
std::vector< uint256 > | vMerkleBranch |
int | nIndex |
bool | fMerkleVerified |
![]() | |
int | nVersion |
std::vector< CTxIn > | vin |
std::vector< CTxOut > | vout |
unsigned int | nLockTime |
Private Attributes | |
const CWallet * | pwallet |
Additional Inherited Members | |
![]() | |
static int64_t | nMinTxFee = 10000 |
Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) More... | |
static int64_t | nMinRelayTxFee = 1000 |
Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) More... | |
static const int | CURRENT_VERSION =1 |
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.
|
inline |
|
inline |
Definition at line 573 of file wallet.h.
Referenced by CWallet::AddToWallet(), and CWallet::CommitTransaction().
void CWalletTx::GetAccountAmounts | ( | const std::string & | strAccount, |
int64_t & | nReceived, | ||
int64_t & | nSent, | ||
int64_t & | nFee | ||
) | const |
Definition at line 803 of file wallet.cpp.
References LOCK, and PAIRTYPE.
Referenced by GetAccountBalance().
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 |
Definition at line 750 of file wallet.cpp.
References ExtractDestination(), LogPrintf, CTxOut::nValue, and CTxOut::scriptPubKey.
Referenced by getbalance(), listaccounts(), and ListTransactions().
|
inline |
Definition at line 618 of file wallet.h.
References CWallet::GetCredit(), CWallet::IsSpent(), and MoneyRange().
Referenced by CWallet::GetBalance(), CWallet::GetUnconfirmedBalance(), and selectCoins().
|
inline |
Definition at line 649 of file wallet.h.
References CWallet::GetChange().
Referenced by TransactionRecord::decomposeTransaction(), and TransactionDesc::toHTML().
set< uint256 > CWalletTx::GetConflicts | ( | ) | const |
Definition at line 919 of file wallet.cpp.
Referenced by WalletTxToJSON().
|
inline |
Definition at line 590 of file wallet.h.
References CWallet::GetCredit().
Referenced by TransactionRecord::decomposeTransaction(), gettransaction(), and TransactionDesc::toHTML().
|
inline |
Definition at line 579 of file wallet.h.
References CWallet::GetDebit().
Referenced by TransactionRecord::decomposeTransaction(), gettransaction(), and TransactionDesc::toHTML().
|
inline |
Definition at line 604 of file wallet.h.
References CWallet::GetCredit().
Referenced by CWallet::GetImmatureBalance().
int CWalletTx::GetRequestCount | ( | ) | const |
Definition at line 711 of file wallet.cpp.
References LOCK.
Referenced by TransactionDesc::FormatTxStatus(), TransactionDesc::toHTML(), and TransactionRecord::updateStatus().
int64_t CWalletTx::GetTxTime | ( | ) | const |
Definition at line 705 of file wallet.cpp.
Referenced by TransactionRecord::decomposeTransaction(), TransactionDesc::toHTML(), CoinControlDialog::updateView(), and WalletTxToJSON().
|
inline |
Definition at line 522 of file wallet.h.
References strprintf, and WriteOrderPos().
|
inline |
Definition at line 664 of file wallet.h.
Referenced by CWallet::GetAddressBalances(), gettransaction(), and CWallet::SelectCoinsMinConf().
|
inline |
Definition at line 669 of file wallet.h.
References bSpendZeroConfChange, CWallet::GetWalletTx(), COutPoint::hash, IsFinalTx(), CWallet::IsMine(), COutPoint::n, CTxIn::prevout, and CTransaction::vout.
Referenced by CWallet::AvailableCoins(), CWallet::GetAddressBalances(), CWallet::GetBalance(), getbalance(), CWallet::GetUnconfirmedBalance(), selectCoins(), and TransactionRecord::updateStatus().
void CWalletTx::RelayWalletTransaction | ( | ) |
Definition at line 907 of file wallet.cpp.
References LogPrintf, RelayTransaction(), and base_uint< BITS >::ToString().
Referenced by CWallet::CommitTransaction(), and CWallet::ResendWalletTransactions().
bool CWalletTx::WriteToDisk | ( | ) |
Definition at line 839 of file wallet.cpp.
References CWalletDB::WriteTx().
Referenced by CWallet::AddToWallet().
char CWalletTx::fFromMe |
Definition at line 462 of file wallet.h.
Referenced by CWallet::AddToWallet(), and CWallet::SyncMetaData().
mapValue_t CWalletTx::mapValue |
Definition at line 457 of file wallet.h.
Referenced by TransactionRecord::decomposeTransaction(), sendfrom(), sendmany(), sendtoaddress(), CWallet::SyncMetaData(), TransactionDesc::toHTML(), and WalletTxToJSON().
int64_t CWalletTx::nOrderPos |
Definition at line 464 of file wallet.h.
Referenced by CWallet::AddToWallet(), CWallet::OrderedTxItems(), and CWalletDB::ReorderTransactions().
unsigned int CWalletTx::nTimeReceived |
Definition at line 460 of file wallet.h.
Referenced by CWallet::AddToWallet(), TransactionDesc::FormatTxStatus(), CWalletDB::ReorderTransactions(), CWallet::ResendWalletTransactions(), TransactionRecord::updateStatus(), and WalletTxToJSON().
unsigned int CWalletTx::nTimeSmart |
Definition at line 461 of file wallet.h.
Referenced by CWallet::AddToWallet(), and CWallet::SyncMetaData().
std::string CWalletTx::strFromAccount |
Definition at line 463 of file wallet.h.
Referenced by sendfrom(), sendmany(), and CWallet::SyncMetaData().
std::vector<std::pair<std::string, std::string> > CWalletTx::vOrderForm |
Definition at line 458 of file wallet.h.
Referenced by WalletModel::sendCoins(), CWallet::SyncMetaData(), and TransactionDesc::toHTML().