diff options
Diffstat (limited to 'src/coins.h')
-rw-r--r-- | src/coins.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/coins.h b/src/coins.h index d338e3172e..c25393f1e0 100644 --- a/src/coins.h +++ b/src/coins.h @@ -344,11 +344,13 @@ public: bool SetBestBlock(const uint256 &hashBlock); bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); + // 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. + const CCoins* AccessCoins(const uint256 &txid) const; + // Return a modifiable reference to a CCoins. Check HaveCoins first. - // Many methods explicitly require a CCoinsViewCache because of this method, to reduce - // copying. CCoins &GetCoins(const uint256 &txid); - const CCoins &GetCoins(const uint256 &txid) const; // Push the modifications applied to this cache to its base. // Failure to call this method before destruction will cause the changes to be forgotten. |