Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
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>
Public Member Functions | |
CBlockHeader () | |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action) |
void | SetNull () |
bool | IsNull () const |
uint256 | GetHash () const |
int64_t | GetBlockTime () const |
Public Attributes | |
int32_t | nVersion |
uint256 | hashPrevBlock |
uint256 | hashMerkleRoot |
uint32_t | nTime |
uint32_t | nBits |
uint32_t | nNonce |
ADD_SERIALIZE_METHODS | |
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.
Constructor & Destructor Documentation
◆ CBlockHeader()
Member Function Documentation
◆ GetBlockTime()
|
inline |
Definition at line 65 of file block.h.
References nTime.
Referenced by blockToJSON(), CDevNetParams::CDevNetParams(), ContextualCheckBlock(), ContextualCheckBlockHeader(), BlockAssembler::CreateNewBlock(), getblocktemplate(), GetNextWorkRequired(), GetNextWorkRequiredBTC(), and SaveBlockToDisk().
◆ GetHash()
uint256 CBlockHeader::GetHash | ( | ) | const |
Definition at line 14 of file block.cpp.
References HashX11(), PROTOCOL_VERSION, and SER_NETWORK.
Referenced by CChainState::AcceptBlockHeader(), CChainState::AddToBlockIndex(), PeerLogicValidation::BlockChecked(), submitblock_StateCatcher::BlockChecked(), CDevNetParams::CDevNetParams(), CheckBlockHeader(), CMainParams::CMainParams(), CChainState::ConnectBlock(), CRegTestParams::CRegTestParams(), CTestNetParams::CTestNetParams(), PartiallyDownloadedBlock::FillBlock(), FindDevNetGenesisBlock(), CDiskBlockIndex::GetBlockHash(), getblocktemplate(), GetTransaction(), PartiallyDownloadedBlock::InitData(), CChainState::LoadGenesisBlock(), llmq::CQuorumBlockProcessor::ProcessBlock(), CDeterministicMNManager::ProcessBlock(), ProcessHeadersMessage(), ReadBlockFromDisk(), TestBlockValidity(), CBlock::ToString(), and CDeterministicMNManager::UndoBlock().
◆ IsNull()
|
inline |
Definition at line 58 of file block.h.
References nBits.
Referenced by PartiallyDownloadedBlock::FillBlock(), PartiallyDownloadedBlock::InitData(), and PartiallyDownloadedBlock::IsTxAvailable().
◆ SerializationOp()
|
inline |
Definition at line 39 of file block.h.
References hashMerkleRoot, hashPrevBlock, nBits, nNonce, nTime, and READWRITE.
◆ SetNull()
|
inline |
Definition at line 48 of file block.h.
References hashMerkleRoot, hashPrevBlock, nBits, nNonce, nTime, nVersion, and base_blob< BITS >::SetNull().
Referenced by CBlockHeader(), PartiallyDownloadedBlock::FillBlock(), ProcessNewBlockHeaders(), and CBlock::SetNull().
Member Data Documentation
◆ ADD_SERIALIZE_METHODS
◆ hashMerkleRoot
uint256 CBlockHeader::hashMerkleRoot |
Definition at line 26 of file block.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), CDevNetParams::CDevNetParams(), CheckBlock(), CMainParams::CMainParams(), CreateDevNetGenesisBlock(), CreateGenesisBlock(), CRegTestParams::CRegTestParams(), CTestNetParams::CTestNetParams(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), IncrementExtraNonce(), SerializationOp(), SetNull(), and CBlock::ToString().
◆ hashPrevBlock
uint256 CBlockHeader::hashPrevBlock |
Definition at line 25 of file block.h.
Referenced by CChainState::AcceptBlockHeader(), CChainState::AddToBlockIndex(), CheckBlockHeader(), CreateDevNetGenesisBlock(), CreateGenesisBlock(), BlockAssembler::CreateNewBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), IncrementExtraNonce(), SerializationOp(), SetNull(), and CBlock::ToString().
◆ nBits
uint32_t CBlockHeader::nBits |
Definition at line 28 of file block.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), CheckBlockHeader(), ContextualCheckBlockHeader(), CreateDevNetGenesisBlock(), CreateGenesisBlock(), BlockAssembler::CreateNewBlock(), FindDevNetGenesisBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), IsNull(), ReadBlockFromDisk(), SerializationOp(), SetNull(), CBlock::ToString(), and UpdateTime().
◆ nNonce
uint32_t CBlockHeader::nNonce |
Definition at line 29 of file block.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), CreateDevNetGenesisBlock(), CreateGenesisBlock(), BlockAssembler::CreateNewBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), SerializationOp(), SetNull(), and CBlock::ToString().
◆ nTime
uint32_t CBlockHeader::nTime |
Definition at line 27 of file block.h.
Referenced by CBlockIndex::CBlockIndex(), CreateDevNetGenesisBlock(), CreateGenesisBlock(), BlockAssembler::CreateNewBlock(), FindDevNetGenesisBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), GetBlockTime(), llmq::CChainLocksHandler::GetBlockTxs(), SerializationOp(), SetNull(), CBlock::ToString(), and UpdateTime().
◆ nVersion
int32_t CBlockHeader::nVersion |
Definition at line 24 of file block.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), ContextualCheckBlockHeader(), CreateDevNetGenesisBlock(), CreateGenesisBlock(), BlockAssembler::CreateNewBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), SetNull(), and CBlock::ToString().
The documentation for this class was generated from the following files: