mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add CCoinsViewCache::HaveCoinsInCache to check if a tx is cached
This commit is contained in:
@@ -144,6 +144,11 @@ bool CCoinsViewCache::HaveCoins(const uint256 &txid) const {
|
||||
return (it != cacheCoins.end() && !it->second.coins.vout.empty());
|
||||
}
|
||||
|
||||
bool CCoinsViewCache::HaveCoinsInCache(const uint256 &txid) const {
|
||||
CCoinsMap::const_iterator it = cacheCoins.find(txid);
|
||||
return it != cacheCoins.end();
|
||||
}
|
||||
|
||||
uint256 CCoinsViewCache::GetBestBlock() const {
|
||||
if (hashBlock.IsNull())
|
||||
hashBlock = base->GetBestBlock();
|
||||
|
||||
Reference in New Issue
Block a user