diff --git a/src/coins.cpp b/src/coins.cpp index 2dceaf09b6d..f8df835e9f6 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -125,7 +125,7 @@ bool CCoinsViewCache::HaveCoin(const COutPoint &outpoint) const { bool CCoinsViewCache::HaveCoinInCache(const COutPoint &outpoint) const { CCoinsMap::const_iterator it = cacheCoins.find(outpoint); - return it != cacheCoins.end(); + return (it != cacheCoins.end() && !it->second.coin.IsSpent()); } uint256 CCoinsViewCache::GetBestBlock() const {