Constructors

Synopses

Declared in <chain.h>

CBlockIndex should not allow public copy construction because equality comparison via pointer is very common throughout the codebase, making use of copy a footgun. Also, use of copies do not have the benefit of simplifying lifetime considerations due to attributes like pprev and pskip, which are at risk of becoming dangling pointers in a copied instance.

constexpr
CBlockIndex(CBlockIndex const& other) = default;

Move construction is deleted to avoid accidental copies of block index entries.

CBlockIndex(CBlockIndex&& other) = delete;

Parameters

Name

Description

other

The entry to copy from.

Created with MrDocs