Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | Private Member Functions | List of all members
CMerkleTx Class Reference

A transaction with a merkle branch linking it to the block chain. More...

#include <main.h>

+ Inheritance diagram for CMerkleTx:
+ Collaboration diagram for CMerkleTx:

Public Member Functions

 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

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 Member Functions

int GetDepthInMainChainINTERNAL (CBlockIndex *&pindexRet) const
 

Additional Inherited Members

- Static Public Attributes inherited from CTransaction
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
 

Detailed Description

A transaction with a merkle branch linking it to the block chain.

Definition at line 426 of file main.h.

Constructor & Destructor Documentation

CMerkleTx::CMerkleTx ( )
inline

Definition at line 440 of file main.h.

References Init().

+ Here is the call graph for this function:

CMerkleTx::CMerkleTx ( const CTransaction txIn)
inline

Definition at line 445 of file main.h.

References Init().

+ Here is the call graph for this function:

Member Function Documentation

bool CMerkleTx::AcceptToMemoryPool ( bool  fLimitFree = true)

Definition at line 1041 of file main.cpp.

References AcceptToMemoryPool().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CMerkleTx::GetBlocksToMaturity ( ) const

Definition at line 1033 of file main.cpp.

References COINBASE_MATURITY.

Referenced by CWallet::AvailableCoins(), GetAccountBalance(), CWallet::GetAddressBalances(), getbalance(), listaccounts(), ListTransactions(), TransactionDesc::toHTML(), and TransactionRecord::updateStatus().

+ Here is the caller graph for this function:

int CMerkleTx::GetDepthInMainChain ( CBlockIndex *&  pindexRet) const

Definition at line 1023 of file main.cpp.

References AssertLockHeld, and CTxMemPool::exists().

Referenced by CWallet::AvailableCoins(), blockToJSON(), TransactionDesc::FormatTxStatus(), GetAccountBalance(), CWallet::GetAddressBalances(), getbalance(), getreceivedbyaccount(), getreceivedbyaddress(), CWallet::GetUnconfirmedBalance(), listaccounts(), ListReceived(), listsinceblock(), ListTransactions(), CWallet::ReacceptWalletTransactions(), TransactionRecord::updateStatus(), and WalletTxToJSON().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CMerkleTx::GetDepthInMainChain ( ) const
inline

Definition at line 475 of file main.h.

References GetDepthInMainChain().

Referenced by GetDepthInMainChain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CMerkleTx::GetDepthInMainChainINTERNAL ( CBlockIndex *&  pindexRet) const
private

Definition at line 997 of file main.cpp.

References AssertLockHeld, CBlock::CheckMerkleBranch(), CChain::Contains(), CBlockIndex::hashMerkleRoot, CChain::Height(), and CBlockIndex::nHeight.

Referenced by IsInMainChain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CMerkleTx::IMPLEMENT_SERIALIZE ( nSerSize+  = SerReadWrite(s,*(CTransaction *) this, nType, nVersion, ser_action);nVersion=this->nVersion;READWRITE(hashBlock);READWRITE(vMerkleBranch);READWRITE(nIndex);) const
void CMerkleTx::Init ( )
inline

Definition at line 450 of file main.h.

Referenced by CMerkleTx().

+ Here is the caller graph for this function:

bool CMerkleTx::IsInMainChain ( ) const
inline

Definition at line 476 of file main.h.

References GetDepthInMainChainINTERNAL().

Referenced by TransactionRecord::showTransaction(), TransactionDesc::toHTML(), and TransactionRecord::updateStatus().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool CMerkleTx::fMerkleVerified
mutable

Definition at line 437 of file main.h.

uint256 CMerkleTx::hashBlock
int CMerkleTx::nIndex

Definition at line 434 of file main.h.

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

std::vector<uint256> CMerkleTx::vMerkleBranch

Definition at line 433 of file main.h.

Referenced by CWallet::AddToWallet().


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