diff options
Diffstat (limited to 'src/coins.h')
-rw-r--r-- | src/coins.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/coins.h b/src/coins.h index d174422100..60c1ba8a78 100644 --- a/src/coins.h +++ b/src/coins.h @@ -406,6 +406,13 @@ public: bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); /** + * Check if we have the given tx already loaded in this cache. + * The semantics are the same as HaveCoins(), but no calls to + * the backing CCoinsView are made. + */ + bool HaveCoinsInCache(const uint256 &txid) const; + + /** * Return a pointer to CCoins in the cache, or NULL if not found. This is * more efficient than GetCoins. Modifications to other cache entries are * allowed while accessing the returned pointer. @@ -437,6 +444,12 @@ public: */ bool Flush(); + /** + * Removes the transaction with the given hash from the cache, if it is + * not modified. + */ + void Uncache(const uint256 &txid); + //! Calculate the size of the cache (in number of transactions) unsigned int GetCacheSize() const; |