|
|
@ -309,7 +309,7 @@ void CTxMemPoolEntry::UpdateState(int64_t modifySize, CAmount modifyFee, int64_t |
|
|
|
CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) : |
|
|
|
CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) : |
|
|
|
nTransactionsUpdated(0) |
|
|
|
nTransactionsUpdated(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
clear(); |
|
|
|
_clear(); //lock free clear
|
|
|
|
|
|
|
|
|
|
|
|
// Sanity checks off by default for performance, because otherwise
|
|
|
|
// Sanity checks off by default for performance, because otherwise
|
|
|
|
// accepting transactions becomes O(N^2) where N is the number
|
|
|
|
// accepting transactions becomes O(N^2) where N is the number
|
|
|
@ -546,9 +546,8 @@ void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned i |
|
|
|
blockSinceLastRollingFeeBump = true; |
|
|
|
blockSinceLastRollingFeeBump = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CTxMemPool::clear() |
|
|
|
void CTxMemPool::_clear() |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOCK(cs); |
|
|
|
|
|
|
|
mapLinks.clear(); |
|
|
|
mapLinks.clear(); |
|
|
|
mapTx.clear(); |
|
|
|
mapTx.clear(); |
|
|
|
mapNextTx.clear(); |
|
|
|
mapNextTx.clear(); |
|
|
@ -560,6 +559,12 @@ void CTxMemPool::clear() |
|
|
|
++nTransactionsUpdated; |
|
|
|
++nTransactionsUpdated; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CTxMemPool::clear() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LOCK(cs); |
|
|
|
|
|
|
|
_clear(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CTxMemPool::check(const CCoinsViewCache *pcoins) const |
|
|
|
void CTxMemPool::check(const CCoinsViewCache *pcoins) const |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!fSanityCheck) |
|
|
|
if (!fSanityCheck) |
|
|
|