Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Used to marshal pointers into hashes for db storage. More...
#include <chain.h>
Public Member Functions | |
CDiskBlockIndex () | |
CDiskBlockIndex (const CBlockIndex *pindex) | |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action) |
uint256 | GetBlockHash () const |
std::string | ToString () const |
Public Member Functions inherited from CBlockIndex | |
void | SetNull () |
CBlockIndex () | |
CBlockIndex (const CBlockHeader &block) | |
CDiskBlockPos | GetBlockPos () const |
CDiskBlockPos | GetUndoPos () const |
CBlockHeader | GetBlockHeader () const |
uint256 | GetBlockHash () const |
int64_t | GetBlockTime () const |
int64_t | GetBlockTimeMax () const |
int64_t | GetMedianTimePast () const |
std::string | ToString () const |
bool | IsValid (enum BlockStatus nUpTo=BLOCK_VALID_TRANSACTIONS) const |
Check whether this block index entry is valid up to the passed validity level. More... | |
bool | RaiseValidity (enum BlockStatus nUpTo) |
Raise the validity level of this block index entry. More... | |
void | BuildSkip () |
Build the skiplist pointer for this entry. More... | |
CBlockIndex * | GetAncestor (int height) |
Efficiently find an ancestor of this block. More... | |
const CBlockIndex * | GetAncestor (int height) const |
Public Attributes | |
uint256 | hash |
uint256 | hashPrev |
ADD_SERIALIZE_METHODS | |
Public Attributes inherited from CBlockIndex | |
const uint256 * | phashBlock |
pointer to the hash of the block, if any. Memory is owned by this CBlockIndex More... | |
CBlockIndex * | pprev |
pointer to the index of the predecessor of this block More... | |
CBlockIndex * | pskip |
pointer to the index of some further predecessor of this block More... | |
int | nHeight |
height of the entry in the chain. The genesis block has height 0 More... | |
int | nFile |
Which # file this block is stored in (blk?????.dat) More... | |
unsigned int | nDataPos |
Byte offset within blk?????.dat where this block's data is stored. More... | |
unsigned int | nUndoPos |
Byte offset within rev?????.dat where this block's undo data is stored. More... | |
arith_uint256 | nChainWork |
(memory only) Total amount of work (expected number of hashes) in the chain up to and including this block More... | |
unsigned int | nTx |
Number of transactions in this block. More... | |
unsigned int | nChainTx |
(memory only) Number of transactions in the chain up to and including this block. More... | |
uint32_t | nStatus |
Verification status of this block. See enum BlockStatus. More... | |
int32_t | nVersion |
block header More... | |
uint256 | hashMerkleRoot |
uint32_t | nTime |
uint32_t | nBits |
uint32_t | nNonce |
int32_t | nSequenceId |
(memory only) Sequential id assigned to distinguish order in which blocks are received. More... | |
unsigned int | nTimeMax |
(memory only) Maximum nTime in the chain up to and including this block. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from CBlockIndex | |
static constexpr int | nMedianTimeSpan = 11 |
Detailed Description
Constructor & Destructor Documentation
◆ CDiskBlockIndex() [1/2]
|
inline |
◆ CDiskBlockIndex() [2/2]
|
inlineexplicit |
Definition at line 381 of file chain.h.
References CBlockIndex::GetBlockHash(), hash, hashPrev, and CBlockIndex::pprev.
Member Function Documentation
◆ GetBlockHash()
|
inline |
Definition at line 415 of file chain.h.
References CBlockHeader::GetHash(), hash, CBlockHeader::hashMerkleRoot, CBlockIndex::hashMerkleRoot, hashPrev, CBlockHeader::hashPrevBlock, CBlockHeader::nBits, CBlockIndex::nBits, CBlockHeader::nNonce, CBlockIndex::nNonce, CBlockHeader::nTime, CBlockIndex::nTime, CBlockHeader::nVersion, and CBlockIndex::nVersion.
Referenced by CBlockTreeDB::LoadBlockIndexGuts(), and ToString().
◆ SerializationOp()
|
inline |
Definition at line 389 of file chain.h.
References BLOCK_HAVE_DATA, BLOCK_HAVE_UNDO, hash, CBlockIndex::hashMerkleRoot, CBlockIndex::nBits, CBlockIndex::nDataPos, CBlockIndex::nFile, CBlockIndex::nHeight, CBlockIndex::nNonce, CBlockIndex::nStatus, CBlockIndex::nTime, CBlockIndex::nTx, CBlockIndex::nUndoPos, CBlockIndex::nVersion, READWRITE, SER_GETHASH, and VARINT.
◆ ToString()
|
inline |
Definition at line 430 of file chain.h.
References GetBlockHash(), hashPrev, strprintf, base_blob< BITS >::ToString(), and CBlockIndex::ToString().
Member Data Documentation
◆ ADD_SERIALIZE_METHODS
◆ hash
uint256 CDiskBlockIndex::hash |
Definition at line 373 of file chain.h.
Referenced by CDiskBlockIndex(), GetBlockHash(), and SerializationOp().
◆ hashPrev
uint256 CDiskBlockIndex::hashPrev |
Definition at line 374 of file chain.h.
Referenced by CDiskBlockIndex(), GetBlockHash(), CBlockTreeDB::LoadBlockIndexGuts(), and ToString().
The documentation for this class was generated from the following file:
- src/chain.h