Dash Core  0.12.2.1
P2P Digital Currency
CDiskBlockIndex Class Reference

#include <chain.h>

+ Inheritance diagram for CDiskBlockIndex:

Public Member Functions

 CDiskBlockIndex ()
 
 CDiskBlockIndex (const CBlockIndex *pindex)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
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 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)
 
void BuildSkip ()
 Build the skiplist pointer for this entry. More...
 
CBlockIndexGetAncestor (int height)
 Efficiently find an ancestor of this block. More...
 
const CBlockIndexGetAncestor (int height) const
 

Public Attributes

uint256 hash
 
uint256 hashPrev
 
 ADD_SERIALIZE_METHODS
 
- Public Attributes inherited from CBlockIndex
const uint256phashBlock
 pointer to the hash of the block, if any. Memory is owned by this CBlockIndex More...
 
CBlockIndexpprev
 pointer to the index of the predecessor of this block More...
 
CBlockIndexpskip
 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
 
unsigned int nChainTx
 
unsigned int nStatus
 Verification status of this block. See enum BlockStatus. More...
 
int nVersion
 block header More...
 
uint256 hashMerkleRoot
 
unsigned int nTime
 
unsigned int nBits
 
unsigned int nNonce
 
uint32_t nSequenceId
 (memory only) Sequential id assigned to distinguish order in which blocks are received. More...
 

Additional Inherited Members

- Public Types inherited from CBlockIndex
enum  { nMedianTimeSpan =11 }
 

Detailed Description

Used to marshal pointers into hashes for db storage.

Definition at line 284 of file chain.h.

Constructor & Destructor Documentation

◆ CDiskBlockIndex() [1/2]

CDiskBlockIndex::CDiskBlockIndex ( )
inline

Definition at line 290 of file chain.h.

◆ CDiskBlockIndex() [2/2]

CDiskBlockIndex::CDiskBlockIndex ( const CBlockIndex pindex)
inlineexplicit

Definition at line 295 of file chain.h.

Member Function Documentation

◆ GetBlockHash()

uint256 CDiskBlockIndex::GetBlockHash ( ) const
inline

Definition at line 328 of file chain.h.

Referenced by CBlockTreeDB::LoadBlockIndexGuts(), and ToString().

◆ SerializationOp()

template<typename Stream , typename Operation >
void CDiskBlockIndex::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 303 of file chain.h.

◆ ToString()

std::string CDiskBlockIndex::ToString ( ) const
inline

Definition at line 343 of file chain.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CDiskBlockIndex::ADD_SERIALIZE_METHODS

Definition at line 300 of file chain.h.

◆ hash

uint256 CDiskBlockIndex::hash

Definition at line 287 of file chain.h.

Referenced by CDiskBlockIndex(), GetBlockHash(), and SerializationOp().

◆ hashPrev

uint256 CDiskBlockIndex::hashPrev

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