mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Add a CBlock.GetBlockHeader
This commit is contained in:
parent
d3b26f7077
commit
587f0f855e
1 changed files with 12 additions and 0 deletions
12
src/main.h
12
src/main.h
|
@ -1218,6 +1218,18 @@ public:
|
|||
nDoS = 0;
|
||||
}
|
||||
|
||||
CBlockHeader GetBlockHeader() const
|
||||
{
|
||||
CBlockHeader block;
|
||||
block.nVersion = nVersion;
|
||||
block.hashPrevBlock = hashPrevBlock;
|
||||
block.hashMerkleRoot = hashMerkleRoot;
|
||||
block.nTime = nTime;
|
||||
block.nBits = nBits;
|
||||
block.nNonce = nNonce;
|
||||
return block;
|
||||
}
|
||||
|
||||
uint256 BuildMerkleTree() const
|
||||
{
|
||||
vMerkleTree.clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue