![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <block.h>
Public Member Functions | |
CBlockHeader () | |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion) |
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 | |
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 66 of file block.h.
Referenced by AcceptBlock(), blockToJSON(), CheckBlockHeader(), ContextualCheckBlock(), ContextualCheckBlockHeader(), CreateNewBlock(), getblocktemplate(), GetNextWorkRequiredBTC(), and InitBlockIndex().
uint256 CBlockHeader::GetHash | ( | ) | const |
Definition at line 13 of file block.cpp.
Referenced by AcceptBlockHeader(), ActivateBestChain(), AddToBlockIndex(), CWallet::AddToWalletIfInvolvingMe(), BitcoinMiner(), PeerLogicValidation::BlockChecked(), submitblock_StateCatcher::BlockChecked(), blockToJSON(), CheckBlock(), CheckBlockHeader(), CMainParams::CMainParams(), ConnectBlock(), CRegTestParams::CRegTestParams(), CTestNetParams::CTestNetParams(), generate(), CDiskBlockIndex::GetBlockHash(), getblocktemplate(), GetTransaction(), ProcessBlockFound(), ReadBlockFromDisk(), CMerkleTx::SetMerkleBranch(), submitblock(), CInstantSend::SyncTransaction(), CPrivateSend::SyncTransaction(), TestBlockValidity(), and CBlock::ToString().
|
inline |
|
inline |
Definition at line 49 of file block.h.
Referenced by CBlockHeader(), and CBlock::SetNull().
uint256 CBlockHeader::hashMerkleRoot |
Definition at line 26 of file block.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), CheckBlock(), CMainParams::CMainParams(), CreateGenesisBlock(), CRegTestParams::CRegTestParams(), CTestNetParams::CTestNetParams(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), IncrementExtraNonce(), SerializationOp(), SetNull(), and CBlock::ToString().
uint256 CBlockHeader::hashPrevBlock |
Definition at line 25 of file block.h.
Referenced by AcceptBlockHeader(), AddToBlockIndex(), CreateGenesisBlock(), CreateNewBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), IncrementExtraNonce(), ProcessBlockFound(), SetNull(), and CBlock::ToString().
uint32_t CBlockHeader::nBits |
Definition at line 28 of file block.h.
Referenced by BitcoinMiner(), blockToJSON(), CBlockIndex::CBlockIndex(), CheckBlockHeader(), ContextualCheckBlockHeader(), CreateGenesisBlock(), CreateNewBlock(), generate(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), IsNull(), ReadBlockFromDisk(), SerializationOp(), SetNull(), CBlock::ToString(), and UpdateTime().
uint32_t CBlockHeader::nNonce |
Definition at line 29 of file block.h.
Referenced by BitcoinMiner(), blockToJSON(), CBlockIndex::CBlockIndex(), CreateGenesisBlock(), CreateNewBlock(), generate(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), GetHash(), SerializationOp(), SetNull(), and CBlock::ToString().
uint32_t CBlockHeader::nTime |
Definition at line 27 of file block.h.
Referenced by CBlockIndex::CBlockIndex(), CreateGenesisBlock(), CreateNewBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), GetBlockTime(), SerializationOp(), SetNull(), CBlock::ToString(), and UpdateTime().
int32_t CBlockHeader::nVersion |
Definition at line 24 of file block.h.
Referenced by blockToJSON(), CBlockIndex::CBlockIndex(), ConnectBlock(), ContextualCheckBlock(), ContextualCheckBlockHeader(), CreateGenesisBlock(), CreateNewBlock(), CDiskBlockIndex::GetBlockHash(), CBlock::GetBlockHeader(), CBlockIndex::GetBlockHeader(), getblocktemplate(), GetHash(), SerializationOp(), SetNull(), and CBlock::ToString().