An in-memory indexed chain of blocks.
More...
#include <chain.h>
An in-memory indexed chain of blocks.
Definition at line 501 of file chain.h.
bool CChain::Contains |
( |
const CBlockIndex * |
pindex | ) |
const |
|
inline |
Efficiently check whether a block is present in this chain.
Definition at line 530 of file chain.h.
CBlockIndex * CChain::FindEarliestAtLeast |
( |
int64_t |
nTime | ) |
const |
Find the earliest block with timestamp equal or greater than the given.
Definition at line 64 of file chain.cpp.
Find the last common block between this chain and a block index entry.
Definition at line 53 of file chain.cpp.
Returns the index entry for the genesis block of this chain, or nullptr if none.
Definition at line 507 of file chain.h.
Return a CBlockLocator that refers to a block in this chain (by default the tip).
Definition at line 25 of file chain.cpp.
int CChain::Height |
( |
| ) |
const |
|
inline |
Return the maximal height in the chain.
Is equal to chain.Tip() ? chain.Tip()->nHeight : -1.
Definition at line 543 of file chain.h.
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 535 of file chain.h.
Returns the index entry at a particular height in this chain, or nullptr if no such height exists.
Definition at line 517 of file chain.h.
Set/initialize a chain with a given tip.
CChain implementation.
Definition at line 13 of file chain.cpp.
Returns the index entry for the tip of this chain, or nullptr if none.
Definition at line 512 of file chain.h.
Compare two chains efficiently.
Definition at line 524 of file chain.h.
The documentation for this class was generated from the following files: