aboutsummaryrefslogtreecommitdiff
path: root/src/coins.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2014-12-31 03:19:24 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2014-12-31 03:19:24 +0000
commit228d2385254ee136ef64d229a414fdd7cefea9a0 (patch)
tree5b791b72f1d63e5d0512603956d90785d4f3c87b /src/coins.h
parent7c001bb49c084a01a09827bf26447a418ecaeb9a (diff)
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.
Diffstat (limited to 'src/coins.h')
-rw-r--r--src/coins.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/coins.h b/src/coins.h
index dbe3f8bd31..e6ba168949 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -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