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

Nodes collect new transactions into a block, hash them into a hash tree, and scan through nonce values to make the block's hash satisfy proof-of-work requirements. More...

#include <block.h>

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

Public Member Functions

 CBlockHeader ()
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
bool IsPoABlockByVersion () const
 
void SetVersionPoABlock ()
 
void SetNull ()
 
bool IsNull () const
 
uint256 GetHash () const
 
uint256 ComputeMinedHash () const
 
int64_t GetBlockTime () const
 

Public Attributes

int32_t nVersion
 
uint256 hashPrevBlock
 
uint256 hashMerkleRoot
 
uint32_t nTime
 
uint32_t nBits
 
uint32_t nNonce
 
uint256 nAccumulatorCheckpoint
 
uint256 hashPrevPoABlock
 
uint256 hashPoAMerkleRoot
 
uint256 minedHash
 
 ADD_SERIALIZE_METHODS
 

Static Public Attributes

static const int32_t CURRENT_VERSION =5
 
static const int32_t POA_BLOCK_VERSION_LOW_LIMIT = 100
 

Detailed Description

Nodes collect new transactions into a block, hash them into a hash tree, and scan through nonce values to make the block's hash satisfy proof-of-work requirements.

When they solve the proof-of-work, they broadcast the block to everyone and the block is added to the block chain. The first transaction in the block is a special one that creates a new coin owned by the creator of the block.

Definition at line 52 of file block.h.

Constructor & Destructor Documentation

◆ CBlockHeader()

CBlockHeader::CBlockHeader ( )
inline

Definition at line 81 of file block.h.

Here is the call graph for this function:

Member Function Documentation

◆ ComputeMinedHash()

uint256 CBlockHeader::ComputeMinedHash ( ) const

Definition at line 66 of file block.cpp.

Here is the call graph for this function:

◆ GetBlockTime()

int64_t CBlockHeader::GetBlockTime ( ) const
inline

Definition at line 135 of file block.h.

Here is the caller graph for this function:

◆ GetHash()

uint256 CBlockHeader::GetHash ( ) const

Definition at line 80 of file block.cpp.

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

◆ IsNull()

bool CBlockHeader::IsNull ( ) const
inline

Definition at line 127 of file block.h.

◆ IsPoABlockByVersion()

bool CBlockHeader::IsPoABlockByVersion ( ) const
inline

Definition at line 105 of file block.h.

Here is the caller graph for this function:

◆ SerializationOp()

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

Definition at line 89 of file block.h.

Here is the call graph for this function:

◆ SetNull()

void CBlockHeader::SetNull ( )
inline

Definition at line 113 of file block.h.

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

◆ SetVersionPoABlock()

void CBlockHeader::SetVersionPoABlock ( )
inline

Definition at line 109 of file block.h.

Here is the caller graph for this function:

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CBlockHeader::ADD_SERIALIZE_METHODS

Definition at line 86 of file block.h.

◆ CURRENT_VERSION

const int32_t CBlockHeader::CURRENT_VERSION =5
static

Definition at line 56 of file block.h.

◆ hashMerkleRoot

uint256 CBlockHeader::hashMerkleRoot

Definition at line 62 of file block.h.

◆ hashPoAMerkleRoot

uint256 CBlockHeader::hashPoAMerkleRoot

Definition at line 75 of file block.h.

◆ hashPrevBlock

uint256 CBlockHeader::hashPrevBlock

Definition at line 61 of file block.h.

◆ hashPrevPoABlock

uint256 CBlockHeader::hashPrevPoABlock

Definition at line 73 of file block.h.

◆ minedHash

uint256 CBlockHeader::minedHash

Definition at line 79 of file block.h.

◆ nAccumulatorCheckpoint

uint256 CBlockHeader::nAccumulatorCheckpoint

Definition at line 67 of file block.h.

◆ nBits

uint32_t CBlockHeader::nBits

Definition at line 65 of file block.h.

◆ nNonce

uint32_t CBlockHeader::nNonce

Definition at line 66 of file block.h.

◆ nTime

uint32_t CBlockHeader::nTime

Definition at line 64 of file block.h.

◆ nVersion

int32_t CBlockHeader::nVersion

Definition at line 59 of file block.h.

◆ POA_BLOCK_VERSION_LOW_LIMIT

const int32_t CBlockHeader::POA_BLOCK_VERSION_LOW_LIMIT = 100
static

Definition at line 58 of file block.h.


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