Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
CDiskBlockIndex Class Reference

Used to marshal pointers into hashes for db storage. More...

#include <main.h>

+ Inheritance diagram for CDiskBlockIndex:
+ Collaboration diagram for CDiskBlockIndex:

Public Member Functions

 CDiskBlockIndex ()
 
 CDiskBlockIndex (CBlockIndex *pindex)
 
 IMPLEMENT_SERIALIZE (if(!(nType &SER_GETHASH)) READWRITE(VARINT(nVersion));READWRITE(VARINT(nHeight));READWRITE(VARINT(nStatus));READWRITE(VARINT(nTx));if(nStatus &(BLOCK_HAVE_DATA|BLOCK_HAVE_UNDO)) READWRITE(VARINT(nFile));if(nStatus &BLOCK_HAVE_DATA) READWRITE(VARINT(nDataPos));if(nStatus &BLOCK_HAVE_UNDO) READWRITE(VARINT(nUndoPos));READWRITE(this->nVersion);READWRITE(hashPrev);READWRITE(hashMerkleRoot);READWRITE(nTime);READWRITE(nBits);READWRITE(nNonce);) uint256 GetBlockHash() const
 
std::string ToString () const
 
void print () const
 
- Public Member Functions inherited from CBlockIndex
 CBlockIndex ()
 
 CBlockIndex (CBlockHeader &block)
 
CDiskBlockPos GetBlockPos () const
 
CDiskBlockPos GetUndoPos () const
 
CBlockHeader GetBlockHeader () const
 
uint256 GetBlockHash () const
 
int64_t GetBlockTime () const
 
CBigNum GetBlockWork () const
 
bool CheckIndex () const
 
int64_t GetMedianTimePast () const
 
int64_t GetMedianTime () const
 
std::string ToString () const
 
void print () const
 

Public Attributes

uint256 hashPrev
 
- Public Attributes inherited from CBlockIndex
const uint256phashBlock
 
CBlockIndexpprev
 
int nHeight
 
int nFile
 
unsigned int nDataPos
 
unsigned int nUndoPos
 
uint256 nChainWork
 
unsigned int nTx
 
unsigned int nChainTx
 
unsigned int nStatus
 
int nVersion
 
uint256 hashMerkleRoot
 
unsigned int nTime
 
unsigned int nBits
 
unsigned int nNonce
 
uint32_t nSequenceId
 

Additional Inherited Members

- Public Types inherited from CBlockIndex
enum  { nMedianTimeSpan =11 }
 
- Static Public Member Functions inherited from CBlockIndex
static bool IsSuperMajority (int minVersion, const CBlockIndex *pstart, unsigned int nRequired, unsigned int nToCheck)
 Returns true if there are nRequired or more blocks of minVersion or above in the last nToCheck blocks, starting at pstart and going backwards. More...
 

Detailed Description

Used to marshal pointers into hashes for db storage.

Definition at line 871 of file main.h.

Constructor & Destructor Documentation

CDiskBlockIndex::CDiskBlockIndex ( )
inline

Definition at line 876 of file main.h.

CDiskBlockIndex::CDiskBlockIndex ( CBlockIndex pindex)
inlineexplicit

Definition at line 880 of file main.h.

References CBlockIndex::GetBlockHash(), and CBlockIndex::pprev.

+ Here is the call graph for this function:

Member Function Documentation

Definition at line 885 of file main.h.

void CDiskBlockIndex::print ( ) const
inline

Definition at line 931 of file main.h.

References LogPrintf, and ToString().

+ Here is the call graph for this function:

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

Definition at line 921 of file main.h.

References CBlockIndex::GetBlockHash(), strprintf, base_uint< BITS >::ToString(), and CBlockIndex::ToString().

Referenced by print().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint256 CDiskBlockIndex::hashPrev

Definition at line 874 of file main.h.


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