PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
CDiskBlockIndex Class Reference

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

#include <chain.h>

Inheritance diagram for CDiskBlockIndex:
[legend]
Collaboration diagram for CDiskBlockIndex:
[legend]

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
uint256 GetBlockTrust () const
 
void SetNull ()
 
 CBlockIndex ()
 
 CBlockIndex (const CBlock &block)
 
CDiskBlockPos GetBlockPos () const
 
CDiskBlockPos GetUndoPos () const
 
CBlockHeader GetBlockHeader () const
 
uint256 GetBlockHash () const
 
int64_t GetBlockTime () const
 
int64_t GetMedianTimePast () const
 
bool IsProofOfWork () const
 
bool IsProofOfStake () const
 
void SetProofOfStake ()
 
bool IsProofOfAudit () const
 
void SetProofOfAudit ()
 
unsigned int GetStakeEntropyBit () const
 
bool SetStakeEntropyBit (unsigned int nEntropyBit)
 
bool GeneratedStakeModifier () const
 
void SetStakeModifier (uint64_t nModifier, bool fGeneratedStakeModifier)
 
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...
 
CBlockIndexGetAncestor (int height)
 Efficiently find an ancestor of this block. More...
 
const CBlockIndexGetAncestor (int height) const
 

Public Attributes

uint256 hashPrev
 
uint256 hashNext
 
 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...
 
CBlockIndexpnext
 pointer to the index of the next block More...
 
CBlockIndexpskip
 pointer to the index of some further predecessor of this block More...
 
uint256 bnChainTrust
 
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...
 
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...
 
unsigned int nStatus
 Verification status of this block. See enum BlockStatus. More...
 
unsigned int nFlags
 
uint64_t nStakeModifier
 
unsigned int nStakeModifierChecksum
 
COutPoint prevoutStake
 
unsigned int nStakeTime
 
uint256 hashProofOfStake
 
int64_t nMint
 
int64_t nMoneySupply
 
int nVersion
 block header More...
 
uint256 hashMerkleRoot
 
unsigned int nTime
 
unsigned int nBits
 
unsigned int nNonce
 
uint256 nAccumulatorCheckpoint
 
uint256 hashPoAMerkleRoot
 PoA block header. More...
 
uint256 minedHash
 
uint256 hashPrevPoABlock
 
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  { BLOCK_PROOF_OF_STAKE = (1 << 0), BLOCK_STAKE_ENTROPY = (1 << 1), BLOCK_STAKE_MODIFIER = (1 << 2), BLOCK_PROOF_OF_AUDIT = (1 << 3) }
 
enum  { nMedianTimeSpan = 11 }
 
- Static Public Member Functions inherited from CBlockIndex
static bool IsSuperMajority (int minVersion, const CBlockIndex *pstart, unsigned int nRequired)
 Returns true if there are nRequired or more blocks of minVersion or above in the last Params().ToCheckBlockUpgradeMajority() blocks, starting at pstart and going backwards. More...
 

Detailed Description

Used to marshal pointers into hashes for db storage.

Definition at line 485 of file chain.h.

Constructor & Destructor Documentation

◆ CDiskBlockIndex() [1/2]

CDiskBlockIndex::CDiskBlockIndex ( )
inline

Definition at line 491 of file chain.h.

◆ CDiskBlockIndex() [2/2]

CDiskBlockIndex::CDiskBlockIndex ( const CBlockIndex pindex)
inlineexplicit

Definition at line 497 of file chain.h.

Here is the call graph for this function:

Member Function Documentation

◆ GetBlockHash()

uint256 CDiskBlockIndex::GetBlockHash ( ) const
inline

Definition at line 555 of file chain.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializationOp()

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

Definition at line 510 of file chain.h.

Here is the call graph for this function:

◆ ToString()

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

Definition at line 571 of file chain.h.

Here is the call graph for this function:

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CDiskBlockIndex::ADD_SERIALIZE_METHODS

Definition at line 507 of file chain.h.

◆ hashNext

uint256 CDiskBlockIndex::hashNext

Definition at line 489 of file chain.h.

◆ hashPrev

uint256 CDiskBlockIndex::hashPrev

Definition at line 488 of file chain.h.


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