Browse Source

Merge #10559: Change semantics of HaveCoinInCache to match HaveCoin

5257698 Change semantics of HaveCoinInCache to match HaveCoin (Alex Morcos)

Tree-SHA512: 397e9ba28646b81fffa53e55064735d4d242aaffdf8484506825f785b0e414f334e4c5cd1e4e1dd9a4b6d1f6954c7ecad15429934a1c4e8d39f596cbd9f5dd80
0.15
Wladimir J. van der Laan 7 years ago
parent
commit
234ffc677e
No known key found for this signature in database
GPG Key ID: 1E4AED62986CD25D
  1. 2
      src/coins.cpp

2
src/coins.cpp

@ -125,7 +125,7 @@ bool CCoinsViewCache::HaveCoin(const COutPoint &outpoint) const { @@ -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 {

Loading…
Cancel
Save