![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
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>
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 |
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 |
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.
|
inline |
Definition at line 389 of file core.h.
Referenced by AcceptBlock(), blockToJSON(), CheckBlock(), PrintBlockTree(), and ProcessBlock().
uint256 CBlockHeader::GetHash | ( | ) | const |
Definition at line 215 of file core.cpp.
References BEGIN, END, Hash(), nNonce, and nVersion.
Referenced by AcceptBlock(), AddToBlockIndex(), blockToJSON(), CheckBlock(), ConnectBlock(), GetTransaction(), CBlock::print(), ProcessBlock(), and ReadBlockFromDisk().
|
static |
Definition at line 348 of file core.h.
Referenced by UpdateTip().
uint256 CBlockHeader::hashMerkleRoot |
Definition at line 351 of file core.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), CheckBlock(), FormatHashBuffers(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), IncrementExtraNonce(), and CBlock::print().
uint256 CBlockHeader::hashPrevBlock |
Definition at line 350 of file core.h.
Referenced by AcceptBlock(), AddToBlockIndex(), CreateNewBlock(), FormatHashBuffers(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), IncrementExtraNonce(), CBlock::print(), and ProcessBlock().
unsigned int CBlockHeader::nBits |
Definition at line 353 of file core.h.
Referenced by AcceptBlock(), blockToJSON(), CBlockIndex::CBlockIndex(), CheckBlock(), CreateNewBlock(), FormatHashBuffers(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), CBlock::print(), ProcessBlock(), ReadBlockFromDisk(), and UpdateTime().
unsigned int CBlockHeader::nNonce |
Definition at line 354 of file core.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), CreateNewBlock(), FormatHashBuffers(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), GetHash(), and CBlock::print().
unsigned int CBlockHeader::nTime |
Definition at line 352 of file core.h.
Referenced by AcceptBlock(), CBlockIndex::CBlockIndex(), FormatHashBuffers(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), mastercore::GetLatestBlockTime(), GetNextWorkRequired(), InitBlockIndex(), CBlock::print(), and UpdateTime().
int CBlockHeader::nVersion |
Definition at line 349 of file core.h.
Referenced by AcceptBlock(), blockToJSON(), CBlockIndex::CBlockIndex(), FormatHashBuffers(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), GetHash(), and CBlock::print().