Make CCoinsViewCache's copy constructor private

It is easily confused with CCoinsViewCache(CCoinsView*), which creates a sub-cache, but instead of creating a sub-cache, the copy constructor would copy the original and use that original's base, defeating the intended isolation.
pull/5580/head
Luke Dashjr 10 years ago
parent 7c001bb49c
commit 228d238525

@ -441,6 +441,11 @@ public:
private:
CCoinsMap::iterator FetchCoins(const uint256 &txid);
CCoinsMap::const_iterator FetchCoins(const uint256 &txid) const;
/**
* By making the copy constructor private, we prevent accidentally using it when one intends to create a cache on top of a base cache.
*/
CCoinsViewCache(const CCoinsViewCache &);
};
#endif // BITCOIN_COINS_H

Loading…
Cancel
Save