Skip to content

Commit

Permalink
Merge #10559: Change semantics of HaveCoinInCache to match HaveCoin
Browse files Browse the repository at this point in the history
    Summary:
    5257698 Change semantics of HaveCoinInCache to match HaveCoin (Alex Morcos)

    Tree-SHA512: 397e9ba28646b81fffa53e55064735d4d242aaffdf8484506825f785b0e414f334e4c5cd1e4e1dd9a4b6d1f6954c7ecad15429934a1c4e8d39f596cbd9f5dd80

    Backport of Core PR10559
    bitcoin/bitcoin#10559
  • Loading branch information
jonspock committed Aug 29, 2019
1 parent ac28f4e commit 9c8c7b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ bool CCoinsViewCache::HaveCoin(const COutPoint &outpoint) const {

bool CCoinsViewCache::HaveCoinInCache(const COutPoint &outpoint) const {
auto it = cacheCoins.find(outpoint);
return it != cacheCoins.end();
return (it != cacheCoins.end() && !it->second.coin.IsSpent());
}

uint256 CCoinsViewCache::GetBestBlock() const {
Expand Down

0 comments on commit 9c8c7b4

Please sign in to comment.