Anoncoin  0.9.4
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 <core.h>

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

Public Member Functions

 CBlockHeader ()
 
 IMPLEMENT_SERIALIZE (READWRITE(this->nVersion);nVersion=this->nVersion;READWRITE(hashPrevBlock);READWRITE(hashMerkleRoot);READWRITE(nTime);READWRITE(nBits);READWRITE(nNonce);) void SetNull()
 
bool IsNull () const
 
uint256 GetHash () const
 
uint256 GetPoWHash () const
 
int64_t GetBlockTime () const
 

Public Attributes

int nVersion
 
uint256 hashPrevBlock
 
uint256 hashMerkleRoot
 
unsigned int nTime
 
unsigned int nBits
 
unsigned int nNonce
 

Static Public Attributes

static const int CURRENT_VERSION =2
 

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 340 of file core.h.

Constructor & Destructor Documentation

CBlockHeader::CBlockHeader ( )
inline

Definition at line 352 of file core.h.

Member Function Documentation

int64_t CBlockHeader::GetBlockTime ( ) const
inline

Definition at line 387 of file core.h.

Here is the caller graph for this function:

uint256 CBlockHeader::GetHash ( ) const

Definition at line 216 of file core.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint256 CBlockHeader::GetPoWHash ( ) const

Definition at line 221 of file core.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CBlockHeader::IMPLEMENT_SERIALIZE ( READWRITE(this->nVersion);  nVersion = this->nVersionREADWRITE(hashPrevBlock); READWRITE(hashMerkleRoot); READWRITE(nTime); READWRITE(nBits); READWRITE(nNonce);)
inline

Definition at line 358 of file core.h.

bool CBlockHeader::IsNull ( ) const
inline

Definition at line 378 of file core.h.

Member Data Documentation

const int CBlockHeader::CURRENT_VERSION =2
static

Definition at line 344 of file core.h.

uint256 CBlockHeader::hashMerkleRoot

Definition at line 347 of file core.h.

uint256 CBlockHeader::hashPrevBlock

Definition at line 346 of file core.h.

unsigned int CBlockHeader::nBits

Definition at line 349 of file core.h.

unsigned int CBlockHeader::nNonce

Definition at line 350 of file core.h.

unsigned int CBlockHeader::nTime

Definition at line 348 of file core.h.

int CBlockHeader::nVersion

Definition at line 345 of file core.h.


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