Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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.

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 116 of file block.h.

Constructor & Destructor Documentation

◆ CBlockLocator() [1/2]

CBlockLocator::CBlockLocator ( )
default
Here is the caller graph for this function:

◆ CBlockLocator() [2/2]

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

Definition at line 131 of file block.h.

Member Function Documentation

◆ IsNull()

bool CBlockLocator::IsNull ( ) const
inline

Definition at line 145 of file block.h.

Here is the caller graph for this function:

◆ SERIALIZE_METHODS()

CBlockLocator::SERIALIZE_METHODS ( CBlockLocator ,
obj  )
inline

Definition at line 133 of file block.h.

Here is the call graph for this function:

◆ SetNull()

void CBlockLocator::SetNull ( )
inline

Definition at line 140 of file block.h.

Here is the caller graph for this function:

Member Data Documentation

◆ DUMMY_VERSION

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 125 of file block.h.

◆ vHave

std::vector<uint256> CBlockLocator::vHave

Definition at line 127 of file block.h.


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