An in-memory indexed chain of blocks.
More...
#include <chain.h>
An in-memory indexed chain of blocks.
Definition at line 416 of file chain.h.
◆ CChain() [1/2]
◆ CChain() [2/2]
CChain::CChain |
( |
const CChain & |
| ) |
|
|
delete |
◆ Contains()
bool CChain::Contains |
( |
const CBlockIndex * |
pindex | ) |
const |
|
inline |
Efficiently check whether a block is present in this chain.
Definition at line 447 of file chain.h.
◆ FindEarliestAtLeast()
CBlockIndex * CChain::FindEarliestAtLeast |
( |
int64_t |
nTime, |
|
|
int |
height |
|
) |
| const |
Find the earliest block with timestamp equal or greater than the given time and height equal or greater than the given height.
Definition at line 71 of file chain.cpp.
◆ FindFork()
Find the last common block between this chain and a block index entry.
Definition at line 60 of file chain.cpp.
◆ Genesis()
Returns the index entry for the genesis block of this chain, or nullptr if none.
Definition at line 427 of file chain.h.
◆ GetLocator()
◆ Height()
int CChain::Height |
( |
| ) |
const |
|
inline |
Return the maximal height in the chain.
Is equal to chain.Tip() ? chain.Tip()->nHeight : -1.
Definition at line 462 of file chain.h.
◆ Next()
Find the successor of a block in this chain, or nullptr if the given index is not found or is the tip.
Definition at line 453 of file chain.h.
◆ operator=()
◆ operator[]()
Returns the index entry at a particular height in this chain, or nullptr if no such height exists.
Definition at line 439 of file chain.h.
◆ SetTip()
Set/initialize a chain with a given tip.
Definition at line 21 of file chain.cpp.
◆ Tip()
Returns the index entry for the tip of this chain, or nullptr if none.
Definition at line 433 of file chain.h.
◆ vChain
The documentation for this class was generated from the following files: