diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-04-25 11:29:37 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-01 12:43:16 -0700 |
commit | 13870b56fcd0bfacedce3ae42a3de3d5e9dc7bc1 (patch) | |
tree | 874be8e8f747c15d337df1f7b5b94875aac8fb68 /src/txmempool.cpp | |
parent | 05293f3cb75ad08ca23cba8e795e27d4d5e4d690 (diff) |
Replace CCoins-based CTxMemPool::pruneSpent with isSpent
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 33df0536d0..51b93e92ba 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -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 |