mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
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.
This commit is contained in:
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…
Reference in New Issue
Block a user