mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
Disallow copies of CChain
This commit is contained in:
parent
aaaceb7fb1
commit
fada66fc2c
1 changed files with 4 additions and 0 deletions
|
@ -412,6 +412,10 @@ private:
|
||||||
std::vector<CBlockIndex*> vChain;
|
std::vector<CBlockIndex*> vChain;
|
||||||
|
|
||||||
public:
|
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. */
|
/** Returns the index entry for the genesis block of this chain, or nullptr if none. */
|
||||||
CBlockIndex *Genesis() const {
|
CBlockIndex *Genesis() const {
|
||||||
return vChain.size() > 0 ? vChain[0] : nullptr;
|
return vChain.size() > 0 ? vChain[0] : nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue