From 587f0f855ebeb888bdcff68b51fc11fa9aa204b9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 15 Aug 2012 01:21:20 +0200 Subject: [PATCH] Add a CBlock.GetBlockHeader --- src/main.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.h b/src/main.h index 3290b16318..d2329af09a 100644 --- a/src/main.h +++ b/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();