Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CBlockLocator Struct Reference

Describes a place in the block chain to another node such that if the other node doesn't have the same branch, it can find a recent common trunk. More...

#include <block.h>

Public Member Functions

 CBlockLocator ()=default
 
 CBlockLocator (std::vector< uint256 > &&have)
 
 SERIALIZE_METHODS (CBlockLocator, obj)
 
void SetNull ()
 
bool IsNull () const
 

Public Attributes

std::vector< uint256vHave
 

Static Public Attributes

static constexpr int DUMMY_VERSION = 70016
 Historically CBlockLocator's version field has been written to network streams as the negotiated protocol version and to disk streams as the client version, but the value has never been used. More...
 

Detailed Description

Describes a place in the block chain to another node such that if the other node doesn't have the same branch, it can find a recent common trunk.

The further back it is, the further before the fork it may be.

Definition at line 123 of file block.h.

Constructor & Destructor Documentation

◆ CBlockLocator() [1/2]

CBlockLocator::CBlockLocator ( )
default

◆ CBlockLocator() [2/2]

CBlockLocator::CBlockLocator ( std::vector< uint256 > &&  have)
inlineexplicit

Definition at line 138 of file block.h.

Member Function Documentation

◆ IsNull()

bool CBlockLocator::IsNull ( ) const
inline

Definition at line 152 of file block.h.

Here is the caller graph for this function:

◆ SERIALIZE_METHODS()

CBlockLocator::SERIALIZE_METHODS ( CBlockLocator  ,
obj   
)
inline

Definition at line 140 of file block.h.

◆ SetNull()

void CBlockLocator::SetNull ( )
inline

Definition at line 147 of file block.h.

Here is the caller graph for this function:

Member Data Documentation

◆ DUMMY_VERSION

constexpr int CBlockLocator::DUMMY_VERSION = 70016
staticconstexpr

Historically CBlockLocator's version field has been written to network streams as the negotiated protocol version and to disk streams as the client version, but the value has never been used.

Hard-code to the highest protocol version ever written to a network stream. SerParams can be used if the field requires any meaning in the future,

Definition at line 132 of file block.h.

◆ vHave

std::vector<uint256> CBlockLocator::vHave

Definition at line 134 of file block.h.


The documentation for this struct was generated from the following file: