![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
#include <txmempool.h>
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, CTxMemPoolEntry > | mapTx |
std::map< COutPoint, CInPoint > | mapNextTx |
Private Attributes | |
bool | fSanityCheck |
unsigned int | nTransactionsUpdated |
Definition at line 54 of file txmempool.h.
CTxMemPool::CTxMemPool | ( | ) |
Definition at line 38 of file txmempool.cpp.
References fSanityCheck.
void CTxMemPool::AddTransactionsUpdated | ( | unsigned int | n | ) |
Definition at line 65 of file txmempool.cpp.
References cs, LOCK, and nTransactionsUpdated.
Referenced by Shutdown(), and UpdateTip().
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().
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().
void CTxMemPool::clear | ( | ) |
Definition at line 131 of file txmempool.cpp.
References cs, LOCK, mapNextTx, mapTx, and nTransactionsUpdated.
|
inline |
Definition at line 91 of file txmempool.h.
References LOCK.
Referenced by AcceptToMemoryPool(), AlreadyHave(), CMerkleTx::GetDepthInMainChain(), getrawmempool(), CCoinsViewMemPool::HaveCoins(), and sendrawtransaction().
unsigned int CTxMemPool::GetTransactionsUpdated | ( | ) | const |
Definition at line 59 of file txmempool.cpp.
References cs, LOCK, and nTransactionsUpdated.
Referenced by getblocktemplate().
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().
Definition at line 46 of file txmempool.cpp.
References cs, LOCK, mapNextTx, and CCoins::Spend().
Referenced by gettxout().
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().
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().
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().
|
inline |
Definition at line 74 of file txmempool.h.
Referenced by AppInit2().
|
inline |
Definition at line 85 of file txmempool.h.
References LOCK.
Referenced by getmininginfo().
|
mutable |
Definition at line 61 of file txmempool.h.
Referenced by AcceptToMemoryPool(), AddTransactionsUpdated(), addUnchecked(), check(), clear(), CreateNewBlock(), getrawmempool(), GetTransactionsUpdated(), gettxout(), lookup(), pruneSpent(), queryHashes(), CWallet::ReacceptWalletTransactions(), remove(), removeConflicts(), and signrawtransaction().
|
private |
Definition at line 57 of file txmempool.h.
Referenced by check(), and CTxMemPool().
Definition at line 63 of file txmempool.h.
Referenced by AcceptToMemoryPool(), addUnchecked(), check(), clear(), pruneSpent(), remove(), and removeConflicts().
std::map<uint256, CTxMemPoolEntry> CTxMemPool::mapTx |
Definition at line 62 of file txmempool.h.
Referenced by addUnchecked(), check(), clear(), CreateNewBlock(), getrawmempool(), lookup(), ProcessMessage(), queryHashes(), and remove().
|
private |
Definition at line 58 of file txmempool.h.
Referenced by AddTransactionsUpdated(), addUnchecked(), clear(), GetTransactionsUpdated(), and remove().