Skip to content

Commit 234ffc6

Browse files
committed
Merge #10559: Change semantics of HaveCoinInCache to match HaveCoin
5257698 Change semantics of HaveCoinInCache to match HaveCoin (Alex Morcos) Tree-SHA512: 397e9ba28646b81fffa53e55064735d4d242aaffdf8484506825f785b0e414f334e4c5cd1e4e1dd9a4b6d1f6954c7ecad15429934a1c4e8d39f596cbd9f5dd80
2 parents 22a0aca + 5257698 commit 234ffc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coins.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ bool CCoinsViewCache::HaveCoin(const COutPoint &outpoint) const {
125125

126126
bool CCoinsViewCache::HaveCoinInCache(const COutPoint &outpoint) const {
127127
CCoinsMap::const_iterator it = cacheCoins.find(outpoint);
128-
return it != cacheCoins.end();
128+
return (it != cacheCoins.end() && !it->second.coin.IsSpent());
129129
}
130130

131131
uint256 CCoinsViewCache::GetBestBlock() const {

0 commit comments

Comments
 (0)