Disallow copies of CChain

This commit is contained in:
MarcoFalke
2021-12-14 12:39:29 +01:00
parent aaaceb7fb1
commit fada66fc2c

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;