Disallow copies of CChain

This commit is contained in:
MarcoFalke committed 2021-12-14 12:42:33 +01:00
1 parent aaaceb7fb1
commit fada66fc2c
1 file changed
+4
+4
View File
@@ -412,6 +412,10 @@ private:
std::vector<CBlockIndex*> vChain;
public:
CChain() = default;
CChain(const CChain&) = delete;
CChain& operator=(const CChain&) = delete;
/** Returns the index entry for the genesis block of this chain, or nullptr if none. */
CBlockIndex *Genesis() const {
return vChain.size() > 0 ? vChain[0] : nullptr;