Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
FoundBlock Class Reference

#include <chain.h>

Collaboration diagram for FoundBlock:
[legend]

Public Member Functions

FoundBlockhash (uint256 &hash)
FoundBlockheight (int &height)
FoundBlocktime (int64_t &time)
FoundBlockmaxTime (int64_t &max_time)
FoundBlockmtpTime (int64_t &mtp_time)
FoundBlockinActiveChain (bool &in_active_chain)
 Return whether block is in the active (most-work) chain.
FoundBlocklocator (CBlockLocator &locator)
 Return locator if block is in the active chain.
FoundBlocknextBlock (const FoundBlock &next_block)
 Return next block in the active chain if current block is in the active chain.
FoundBlockdata (CBlock &data)

Public Attributes

uint256m_hash = nullptr
int * m_height = nullptr
int64_t * m_time = nullptr
int64_t * m_max_time = nullptr
int64_t * m_mtp_time = nullptr
bool * m_in_active_chain = nullptr
CBlockLocatorm_locator = nullptr
const FoundBlockm_next_block = nullptr
CBlockm_data = nullptr
bool found = false

Detailed Description

Helper for findBlock to selectively return pieces of block data. If block is found, data will be returned by setting specified output variables. If block is not found, output variables will keep their previous values.

Definition at line 52 of file chain.h.

Member Function Documentation

◆ data()

Read block data from disk. If the block exists but doesn't have data (for example due to pruning), the CBlock variable will be set to null.

Definition at line 68 of file chain.h.

◆ hash()

Definition at line 55 of file chain.h.

◆ height()

FoundBlock & interfaces::FoundBlock::height ( int & height)
inline

Definition at line 56 of file chain.h.

◆ inActiveChain()

FoundBlock & interfaces::FoundBlock::inActiveChain ( bool & in_active_chain)
inline

Return whether block is in the active (most-work) chain.

Definition at line 61 of file chain.h.

◆ locator()

Return locator if block is in the active chain.

Definition at line 63 of file chain.h.

◆ maxTime()

FoundBlock & interfaces::FoundBlock::maxTime ( int64_t & max_time)
inline

Definition at line 58 of file chain.h.

◆ mtpTime()

FoundBlock & interfaces::FoundBlock::mtpTime ( int64_t & mtp_time)
inline

Definition at line 59 of file chain.h.

◆ nextBlock()

Return next block in the active chain if current block is in the active chain.

Definition at line 65 of file chain.h.

◆ time()

FoundBlock & interfaces::FoundBlock::time ( int64_t & time)
inline

Definition at line 57 of file chain.h.

Member Data Documentation

◆ found

bool interfaces::FoundBlock::found = false
mutable

Definition at line 79 of file chain.h.

◆ m_data

Definition at line 78 of file chain.h.

◆ m_hash

Definition at line 70 of file chain.h.

◆ m_height

Definition at line 71 of file chain.h.

◆ m_in_active_chain

Definition at line 75 of file chain.h.

◆ m_locator

Definition at line 76 of file chain.h.

◆ m_max_time

Definition at line 73 of file chain.h.

◆ m_mtp_time

Definition at line 74 of file chain.h.

◆ m_next_block

Definition at line 77 of file chain.h.

◆ m_time

int64_t* interfaces::FoundBlock::m_time = nullptr

Definition at line 72 of file chain.h.


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