Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | CTxMemPool::CTxMemPool() : nTransactionsUpdated(0) { | ||||
// Sanity checks off by default for performance, because otherwise accepting | // Sanity checks off by default for performance, because otherwise accepting | ||||
// transactions becomes O(N^2) where N is the number of transactions in the | // transactions becomes O(N^2) where N is the number of transactions in the | ||||
// pool | // pool | ||||
nCheckFrequency = 0; | nCheckFrequency = 0; | ||||
} | } | ||||
CTxMemPool::~CTxMemPool() {} | CTxMemPool::~CTxMemPool() {} | ||||
bool CTxMemPool::isSpent(const COutPoint &outpoint) { | bool CTxMemPool::isSpent(const COutPoint &outpoint) const { | ||||
LOCK(cs); | LOCK(cs); | ||||
return mapNextTx.count(outpoint); | return mapNextTx.count(outpoint); | ||||
} | } | ||||
unsigned int CTxMemPool::GetTransactionsUpdated() const { | unsigned int CTxMemPool::GetTransactionsUpdated() const { | ||||
LOCK(cs); | LOCK(cs); | ||||
return nTransactionsUpdated; | return nTransactionsUpdated; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 995 Lines • Show Last 20 Lines |