From 1fdc7c41bb1eea3a25c3387f147ff8839a78d4ad Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 22 Mar 2018 13:55:22 +0200 Subject: [PATCH] Make CTxMemPool::isSpent() const --- src/txmempool.cpp | 2 +- src/txmempool.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index d1edde284..cc639288d 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -339,7 +339,7 @@ CTxMemPool::CTxMemPool(CBlockPolicyEstimator* estimator) : nCheckFrequency = 0; } -bool CTxMemPool::isSpent(const COutPoint& outpoint) +bool CTxMemPool::isSpent(const COutPoint& outpoint) const { LOCK(cs); return mapNextTx.count(outpoint); diff --git a/src/txmempool.h b/src/txmempool.h index 08a342101..699f6b554 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -550,7 +550,7 @@ public: void _clear(); //lock free bool CompareDepthAndScore(const uint256& hasha, const uint256& hashb); void queryHashes(std::vector& vtxid); - bool isSpent(const COutPoint& outpoint); + bool isSpent(const COutPoint& outpoint) const; unsigned int GetTransactionsUpdated() const; void AddTransactionsUpdated(unsigned int n); /**