Bitcoin ABC 0.26.3
P2P Digital Currency
|
Used to marshal pointers into hashes for db storage. More...
#include <chain.h>
Public Member Functions | |
CDiskBlockIndex () | |
CDiskBlockIndex (const CBlockIndex *pindex) | |
SERIALIZE_METHODS (CDiskBlockIndex, obj) | |
BlockHash | ConstructBlockHash () const |
BlockHash | GetBlockHash ()=delete |
std::string | ToString ()=delete |
Public Member Functions inherited from CBlockIndex | |
int nFile | GUARDED_BY (::cs_main) |
Which # file this block is stored in (blk?????.dat) | |
unsigned int nDataPos | GUARDED_BY (::cs_main) |
Byte offset within blk?????.dat where this block's data is stored. | |
unsigned int nUndoPos | GUARDED_BY (::cs_main) |
Byte offset within rev?????.dat where this block's undo data is stored. | |
BlockStatus nStatus | GUARDED_BY (::cs_main) |
Verification status of this block. See enum BlockStatus. | |
CBlockIndex ()=default | |
CBlockIndex (const CBlockHeader &block) | |
FlatFilePos | GetBlockPos () const EXCLUSIVE_LOCKS_REQUIRED( |
FlatFilePos | GetUndoPos () const EXCLUSIVE_LOCKS_REQUIRED( |
CBlockHeader | GetBlockHeader () const |
BlockHash | GetBlockHash () const |
int64_t | GetChainTxCount () const |
Get the number of transaction in the chain so far. | |
uint64_t | GetChainSize () const |
Get the size of all the blocks in the chain so far. | |
bool | UpdateChainStats () |
Update chain tx stats. | |
bool | HaveTxsDownloaded () const |
Check whether this block's and all previous blocks' transactions have been downloaded (and stored to disk) at some point. | |
NodeSeconds | Time () const |
int64_t | GetBlockTime () const |
int64_t | GetBlockTimeMax () const |
int64_t | GetHeaderReceivedTime () const |
int64_t | GetReceivedTimeDiff () const |
int64_t | GetMedianTimePast () const |
std::string | ToString () const |
bool | IsValid (enum BlockValidity nUpTo=BlockValidity::TRANSACTIONS) const EXCLUSIVE_LOCKS_REQUIRED( |
Check whether this block index entry is valid up to the passed validity level. | |
bool | IsAssumedValid () const EXCLUSIVE_LOCKS_REQUIRED( |
bool | RaiseValidity (enum BlockValidity nUpTo) EXCLUSIVE_LOCKS_REQUIRED( |
Raise the validity level of this block index entry. | |
void | BuildSkip () |
Build the skiplist pointer for this entry. | |
CBlockIndex * | GetAncestor (int height) |
Efficiently find an ancestor of this block. | |
const CBlockIndex * | GetAncestor (int height) const |
Public Attributes | |
BlockHash | hashPrev |
Public Attributes inherited from CBlockIndex | |
const BlockHash * | phashBlock {nullptr} |
pointer to the hash of the block, if any. | |
CBlockIndex * | pprev {nullptr} |
pointer to the index of the predecessor of this block | |
CBlockIndex * | pskip {nullptr} |
pointer to the index of some further predecessor of this block | |
int | nHeight {0} |
height of the entry in the chain. The genesis block has height 0 | |
arith_uint256 | nChainWork {} |
(memory only) Total amount of work (expected number of hashes) in the chain up to and including this block | |
unsigned int | nTx {0} |
Number of transactions in this block. | |
unsigned int | nSize {0} |
Size of this block. | |
unsigned int | nChainTx {0} |
(memory only) Number of transactions in the chain up to and including this block. | |
int32_t | nVersion {0} |
block header | |
uint256 | hashMerkleRoot {} |
uint32_t | nTime {0} |
uint32_t | nBits {0} |
uint32_t | nNonce {0} |
int32_t | nSequenceId {0} |
(memory only) Sequential id assigned to distinguish order in which blocks are received. | |
int64_t | nTimeReceived {0} |
(memory only) block header metadata | |
unsigned int | nTimeMax {0} |
(memory only) Maximum nTime in the chain up to and including this block. | |
Static Public Attributes | |
static constexpr int | TRACK_SIZE_VERSION = 220800 |
Static Public Attributes inherited from CBlockIndex | |
static constexpr int | nMedianTimeSpan = 11 |
|
inlineexplicit |
|
inline |
|
delete |
|
inline |
|
delete |