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
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue