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 Attributes | List of all members
CTxMemPool Class Reference

#include <txmempool.h>

+ Collaboration diagram for CTxMemPool:

Public Member Functions

 CTxMemPool ()
 
void check (CCoinsViewCache *pcoins) const
 
void setSanityCheck (bool _fSanityCheck)
 
bool addUnchecked (const uint256 &hash, const CTxMemPoolEntry &entry)
 
void remove (const CTransaction &tx, std::list< CTransaction > &removed, bool fRecursive=false)
 
void removeConflicts (const CTransaction &tx, std::list< CTransaction > &removed)
 
void clear ()
 
void queryHashes (std::vector< uint256 > &vtxid)
 
void pruneSpent (const uint256 &hash, CCoins &coins)
 
unsigned int GetTransactionsUpdated () const
 
void AddTransactionsUpdated (unsigned int n)
 
unsigned long size ()
 
bool exists (uint256 hash)
 
bool lookup (uint256 hash, CTransaction &result) const
 

Public Attributes

CCriticalSection cs
 
std::map< uint256, CTxMemPoolEntrymapTx
 
std::map< COutPoint, CInPointmapNextTx
 

Private Attributes

bool fSanityCheck
 
unsigned int nTransactionsUpdated
 

Detailed Description

Definition at line 54 of file txmempool.h.

Constructor & Destructor Documentation

CTxMemPool::CTxMemPool ( )

Definition at line 38 of file txmempool.cpp.

References fSanityCheck.

Member Function Documentation

void CTxMemPool::AddTransactionsUpdated ( unsigned int  n)

Definition at line 65 of file txmempool.cpp.

References cs, LOCK, and nTransactionsUpdated.

Referenced by Shutdown(), and UpdateTip().

+ Here is the caller graph for this function:

bool CTxMemPool::addUnchecked ( const uint256 hash,
const CTxMemPoolEntry entry 
)

Definition at line 72 of file txmempool.cpp.

References cs, LOCK, mapNextTx, mapTx, nTransactionsUpdated, and CTransaction::vin.

Referenced by AcceptToMemoryPool().

+ Here is the caller graph for this function:

void CTxMemPool::check ( CCoinsViewCache pcoins) const

Definition at line 139 of file txmempool.cpp.

References cs, fSanityCheck, CCoinsViewCache::GetCoins(), COutPoint::hash, CCoins::IsAvailable(), LOCK, LogPrint(), mapNextTx, mapTx, COutPoint::n, CTxIn::prevout, CTransaction::vin, and CTransaction::vout.

Referenced by ConnectTip(), DisconnectTip(), and ProcessMessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CTxMemPool::clear ( )

Definition at line 131 of file txmempool.cpp.

References cs, LOCK, mapNextTx, mapTx, and nTransactionsUpdated.

bool CTxMemPool::exists ( uint256  hash)
inline

Definition at line 91 of file txmempool.h.

References LOCK.

Referenced by AcceptToMemoryPool(), AlreadyHave(), CMerkleTx::GetDepthInMainChain(), getrawmempool(), CCoinsViewMemPool::HaveCoins(), and sendrawtransaction().

+ Here is the caller graph for this function:

unsigned int CTxMemPool::GetTransactionsUpdated ( ) const

Definition at line 59 of file txmempool.cpp.

References cs, LOCK, and nTransactionsUpdated.

Referenced by getblocktemplate().

+ Here is the caller graph for this function:

bool CTxMemPool::lookup ( uint256  hash,
CTransaction result 
) const

Definition at line 189 of file txmempool.cpp.

References cs, LOCK, and mapTx.

Referenced by CCoinsViewMemPool::GetCoins(), GetTransaction(), ProcessGetData(), and ProcessMessage().

+ Here is the caller graph for this function:

void CTxMemPool::pruneSpent ( const uint256 hash,
CCoins coins 
)

Definition at line 46 of file txmempool.cpp.

References cs, LOCK, mapNextTx, and CCoins::Spend().

Referenced by gettxout().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CTxMemPool::queryHashes ( std::vector< uint256 > &  vtxid)

Definition at line 179 of file txmempool.cpp.

References cs, LOCK, and mapTx.

Referenced by getrawmempool(), and ProcessMessage().

+ Here is the caller graph for this function:

void CTxMemPool::remove ( const CTransaction tx,
std::list< CTransaction > &  removed,
bool  fRecursive = false 
)

Definition at line 89 of file txmempool.cpp.

References cs, CTransaction::GetHash(), LOCK, mapNextTx, mapTx, nTransactionsUpdated, CTxIn::prevout, CTransaction::vin, and CTransaction::vout.

Referenced by ConnectTip(), and DisconnectTip().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CTxMemPool::removeConflicts ( const CTransaction tx,
std::list< CTransaction > &  removed 
)

Definition at line 114 of file txmempool.cpp.

References cs, LOCK, mapNextTx, CTxIn::prevout, and CTransaction::vin.

Referenced by ConnectTip().

+ Here is the caller graph for this function:

void CTxMemPool::setSanityCheck ( bool  _fSanityCheck)
inline

Definition at line 74 of file txmempool.h.

Referenced by AppInit2().

+ Here is the caller graph for this function:

unsigned long CTxMemPool::size ( )
inline

Definition at line 85 of file txmempool.h.

References LOCK.

Referenced by getmininginfo().

+ Here is the caller graph for this function:

Member Data Documentation

CCriticalSection CTxMemPool::cs
mutable
bool CTxMemPool::fSanityCheck
private

Definition at line 57 of file txmempool.h.

Referenced by check(), and CTxMemPool().

std::map<COutPoint, CInPoint> CTxMemPool::mapNextTx
std::map<uint256, CTxMemPoolEntry> CTxMemPool::mapTx
unsigned int CTxMemPool::nTransactionsUpdated
private

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