Fabcoin Core  0.16.2
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)
 
void SetNull ()
 
bool IsNull () const
 
uint256 GetHash () const
 
uint256 GetHash (const Consensus::Params &params) const
 
uint256 GetHashWithoutSign () const
 
int64_t GetBlockTime () const
 
CBlockHeaderoperator= (const CBlockHeader &other)
 
std::string ToString () const
 

Public Attributes

int32_t nVersion
 
uint256 hashPrevBlock
 
uint256 hashMerkleRoot
 
uint32_t nHeight
 
uint32_t nReserved [7]
 
uint32_t nTime
 
uint32_t nBits
 
uint256 hashStateRoot
 
uint256 hashUTXORoot
 
uint256 nNonce
 
std::vector< unsigned char > nSolution
 
 ADD_SERIALIZE_METHODS
 

Static Public Attributes

static const size_t HEADER_SIZE = 4+32+32+4+28+4+4+32
 
static const size_t HEADER_NEWSIZE = 4+32+32+4+28+4+4+32+32+32
 

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 35 of file block.h.

Constructor & Destructor Documentation

CBlockHeader::CBlockHeader ( )
inline

Definition at line 56 of file block.h.

Member Function Documentation

int64_t CBlockHeader::GetBlockTime ( ) const
inline

Definition at line 127 of file block.h.

Here is the caller graph for this function:

uint256 CBlockHeader::GetHash ( ) const

Definition at line 38 of file block.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint256 CBlockHeader::GetHash ( const Consensus::Params params) const

Definition at line 17 of file block.cpp.

Here is the call graph for this function:

uint256 CBlockHeader::GetHashWithoutSign ( ) const

Definition at line 46 of file block.cpp.

Here is the call graph for this function:

bool CBlockHeader::IsNull ( ) const
inline

Definition at line 118 of file block.h.

Here is the caller graph for this function:

CBlockHeader& CBlockHeader::operator= ( const CBlockHeader other)
inline

Definition at line 131 of file block.h.

Here is the call graph for this function:

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

Definition at line 64 of file block.h.

Here is the call graph for this function:

void CBlockHeader::SetNull ( )
inline

Definition at line 101 of file block.h.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string CBlockHeader::ToString ( ) const

Definition at line 51 of file block.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

CBlockHeader::ADD_SERIALIZE_METHODS

Definition at line 61 of file block.h.

uint256 CBlockHeader::hashMerkleRoot

Definition at line 45 of file block.h.

uint256 CBlockHeader::hashPrevBlock

Definition at line 44 of file block.h.

uint256 CBlockHeader::hashStateRoot

Definition at line 50 of file block.h.

uint256 CBlockHeader::hashUTXORoot

Definition at line 51 of file block.h.

const size_t CBlockHeader::HEADER_NEWSIZE = 4+32+32+4+28+4+4+32+32+32
static

Definition at line 40 of file block.h.

const size_t CBlockHeader::HEADER_SIZE = 4+32+32+4+28+4+4+32
static

Definition at line 39 of file block.h.

uint32_t CBlockHeader::nBits

Definition at line 49 of file block.h.

uint32_t CBlockHeader::nHeight

Definition at line 46 of file block.h.

uint256 CBlockHeader::nNonce

Definition at line 53 of file block.h.

uint32_t CBlockHeader::nReserved[7]

Definition at line 47 of file block.h.

std::vector<unsigned char> CBlockHeader::nSolution

Definition at line 54 of file block.h.

uint32_t CBlockHeader::nTime

Definition at line 48 of file block.h.

int32_t CBlockHeader::nVersion

Definition at line 43 of file block.h.


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