|
|
|
@ -343,17 +343,10 @@ CTxMemPool::CTxMemPool(CBlockPolicyEstimator* estimator) :
|
|
|
|
|
nCheckFrequency = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CTxMemPool::pruneSpent(const uint256 &hashTx, CCoins &coins)
|
|
|
|
|
bool CTxMemPool::isSpent(const COutPoint& outpoint)
|
|
|
|
|
{
|
|
|
|
|
LOCK(cs);
|
|
|
|
|
|
|
|
|
|
auto it = mapNextTx.lower_bound(COutPoint(hashTx, 0));
|
|
|
|
|
|
|
|
|
|
// iterate over all COutPoints in mapNextTx whose hash equals the provided hashTx
|
|
|
|
|
while (it != mapNextTx.end() && it->first->hash == hashTx) {
|
|
|
|
|
coins.Spend(it->first->n); // and remove those outputs from coins
|
|
|
|
|
it++;
|
|
|
|
|
}
|
|
|
|
|
return mapNextTx.count(outpoint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsigned int CTxMemPool::GetTransactionsUpdated() const
|
|
|
|
|