Bitcoin ABC 0.30.7
P2P Digital Currency
Public Member Functions | 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 ()
 
 SERIALIZE_METHODS (CBlockHeader, obj)
 
void SetNull ()
 
bool IsNull () const
 
BlockHash GetHash () const
 
NodeSeconds Time () const
 
int64_t GetBlockTime () const
 

Public Attributes

int32_t nVersion
 
BlockHash hashPrevBlock
 
uint256 hashMerkleRoot
 
uint32_t nTime
 
uint32_t nBits
 
uint32_t nNonce
 

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

Constructor & Destructor Documentation

◆ CBlockHeader()

CBlockHeader::CBlockHeader ( )
inline

Definition at line 33 of file block.h.

Here is the call graph for this function:

Member Function Documentation

◆ GetBlockTime()

int64_t CBlockHeader::GetBlockTime ( ) const
inline

Definition at line 57 of file block.h.

Here is the caller graph for this function:

◆ GetHash()

BlockHash CBlockHeader::GetHash ( ) const

Definition at line 11 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 49 of file block.h.

Here is the caller graph for this function:

◆ SERIALIZE_METHODS()

CBlockHeader::SERIALIZE_METHODS ( CBlockHeader  ,
obj   
)
inline

Definition at line 35 of file block.h.

◆ SetNull()

void CBlockHeader::SetNull ( )
inline

Definition at line 40 of file block.h.

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

◆ Time()

NodeSeconds CBlockHeader::Time ( ) const
inline

Definition at line 53 of file block.h.

Here is the caller graph for this function:

Member Data Documentation

◆ hashMerkleRoot

uint256 CBlockHeader::hashMerkleRoot

Definition at line 28 of file block.h.

◆ hashPrevBlock

BlockHash CBlockHeader::hashPrevBlock

Definition at line 27 of file block.h.

◆ nBits

uint32_t CBlockHeader::nBits

Definition at line 30 of file block.h.

◆ nNonce

uint32_t CBlockHeader::nNonce

Definition at line 31 of file block.h.

◆ nTime

uint32_t CBlockHeader::nTime

Definition at line 29 of file block.h.

◆ nVersion

int32_t CBlockHeader::nVersion

Definition at line 26 of file block.h.


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