diff options
| author | Matt Corallo <[email protected]> | 2015-10-22 15:49:53 -0700 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2015-12-01 15:52:09 -0800 |
| commit | 97bf377bd1f27ad841e1414e74361923a9f794f5 (patch) | |
| tree | 636b92174fbced1d0bcc9238fdbbe00baf2b73c4 /src/coins.cpp | |
| parent | Discard txn cache entries that were loaded for removed mempool txn (diff) | |
| download | discoin-97bf377bd1f27ad841e1414e74361923a9f794f5.tar.xz discoin-97bf377bd1f27ad841e1414e74361923a9f794f5.zip | |
Add CCoinsViewCache::HaveCoinsInCache to check if a tx is cached
Diffstat (limited to 'src/coins.cpp')
| -rw-r--r-- | src/coins.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/coins.cpp b/src/coins.cpp index 060d6b7c5..122bf4e48 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -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(); |