aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 226dd9f353..92379484e3 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -993,6 +993,7 @@ bool CCoinsViewMemPool::GetCoin(const COutPoint &outpoint, Coin &coin) const {
if (ptx) {
if (outpoint.n < ptx->vout.size()) {
coin = Coin(ptx->vout[outpoint.n], MEMPOOL_HEIGHT, false);
+ m_non_base_coins.emplace(outpoint);
return true;
} else {
return false;
@@ -1005,8 +1006,14 @@ void CCoinsViewMemPool::PackageAddTransaction(const CTransactionRef& tx)
{
for (unsigned int n = 0; n < tx->vout.size(); ++n) {
m_temp_added.emplace(COutPoint(tx->GetHash(), n), Coin(tx->vout[n], MEMPOOL_HEIGHT, false));
+ m_non_base_coins.emplace(COutPoint(tx->GetHash(), n));
}
}
+void CCoinsViewMemPool::Reset()
+{
+ m_temp_added.clear();
+ m_non_base_coins.clear();
+}
size_t CTxMemPool::DynamicMemoryUsage() const {
LOCK(cs);