Add a CBlock.GetBlockHeader

This commit is contained in:
Matt Corallo 2012-08-15 01:21:20 +02:00
parent d3b26f7077
commit 587f0f855e

View File

@ -1218,6 +1218,18 @@ public:
nDoS = 0; 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 uint256 BuildMerkleTree() const
{ {
vMerkleTree.clear(); vMerkleTree.clear();