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

#include <block.h>

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

Public Member Functions

 CBlock ()
 
 CBlock (const CBlockHeader &header)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
void SetNull ()
 
CBlockHeader GetBlockHeader () const
 
bool IsProofOfStake () const
 
bool IsProofOfWork () const
 
bool IsProofOfAudit () const
 
std::pair< COutPoint, unsigned int > GetProofOfStake () const
 
std::string ToString () const
 
void print () const
 
uint256 ComputePoAMerkleTree (bool *mutated=NULL) const
 
- Public Member Functions inherited from CBlockHeader
 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

std::vector< CTransactionvtx
 
std::vector< PoSBlockSummaryposBlocksAudited
 
std::vector< unsigned char > vchBlockSig
 
CScript payee
 
bool fChecked
 
std::vector< uint256poaMerkleTree
 
 ADD_SERIALIZE_METHODS
 
- Public Attributes inherited from CBlockHeader
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
 

Additional Inherited Members

- Static Public Attributes inherited from CBlockHeader
static const int32_t CURRENT_VERSION =5
 
static const int32_t POA_BLOCK_VERSION_LOW_LIMIT = 100
 

Detailed Description

Definition at line 142 of file block.h.

Constructor & Destructor Documentation

◆ CBlock() [1/2]

CBlock::CBlock ( )
inline

Definition at line 159 of file block.h.

Here is the call graph for this function:

◆ CBlock() [2/2]

CBlock::CBlock ( const CBlockHeader header)
inline

Definition at line 164 of file block.h.

Here is the call graph for this function:

Member Function Documentation

◆ ComputePoAMerkleTree()

uint256 CBlock::ComputePoAMerkleTree ( bool *  mutated = NULL) const

Definition at line 122 of file block.cpp.

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

◆ GetBlockHeader()

CBlockHeader CBlock::GetBlockHeader ( ) const
inline

Definition at line 194 of file block.h.

Here is the caller graph for this function:

◆ GetProofOfStake()

std::pair<COutPoint, unsigned int> CBlock::GetProofOfStake ( ) const
inline

Definition at line 233 of file block.h.

Here is the call graph for this function:

◆ IsProofOfAudit()

bool CBlock::IsProofOfAudit ( ) const
inline
Todo:
add condition check for Audit mining
Returns

Definition at line 228 of file block.h.

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

◆ IsProofOfStake()

bool CBlock::IsProofOfStake ( ) const
inline

Definition at line 213 of file block.h.

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

◆ IsProofOfWork()

bool CBlock::IsProofOfWork ( ) const
inline

Definition at line 218 of file block.h.

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

◆ print()

void CBlock::print ( ) const

Definition at line 181 of file block.cpp.

Here is the call graph for this function:

◆ SerializationOp()

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

Definition at line 173 of file block.h.

Here is the call graph for this function:

◆ SetNull()

void CBlock::SetNull ( )
inline

Definition at line 183 of file block.h.

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

◆ ToString()

std::string CBlock::ToString ( ) const

Definition at line 150 of file block.cpp.

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

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CBlock::ADD_SERIALIZE_METHODS

Definition at line 170 of file block.h.

◆ fChecked

bool CBlock::fChecked
mutable

Definition at line 156 of file block.h.

◆ payee

CScript CBlock::payee
mutable

Definition at line 155 of file block.h.

◆ poaMerkleTree

std::vector<uint256> CBlock::poaMerkleTree
mutable

Definition at line 157 of file block.h.

◆ posBlocksAudited

std::vector<PoSBlockSummary> CBlock::posBlocksAudited

Definition at line 149 of file block.h.

◆ vchBlockSig

std::vector<unsigned char> CBlock::vchBlockSig

Definition at line 152 of file block.h.

◆ vtx

std::vector<CTransaction> CBlock::vtx

Definition at line 146 of file block.h.


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