aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2012-08-15 01:21:20 +0200
committerMatt Corallo <git@bluematt.me>2013-01-16 12:48:02 -0500
commit587f0f855ebeb888bdcff68b51fc11fa9aa204b9 (patch)
tree26508b0aa1c9e47ef6d89529d4c31eaa7b6e0f44 /src
parentd3b26f7077f58ebfcfccc5f0b16f8c29be5dc6b5 (diff)
Add a CBlock.GetBlockHeader
Diffstat (limited to 'src')
-rw-r--r--src/main.h12
1 files changed, 12 insertions, 0 deletions
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();