aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2013-08-24 19:45:50 -0700
committerJeff Garzik <jgarzik@bitpay.com>2013-08-24 19:45:50 -0700
commit750ae29664d0e1fd50df464790d8e6aaa666946a (patch)
treeeb1ab9c0a198f86a4ecd13ee46b9982a25c44cee
parente9e2ef5fbd610fbaa3801440254c39ac4ba8f91d (diff)
parent1b3656d50bda646822fd954714a88dea1528548b (diff)
Merge pull request #2852 from petertodd/getblock-chainwork
Add 'chainwork' to getblock
-rw-r--r--src/rpcblockchain.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index edaa732225..ba346f19d9 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -62,6 +62,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
result.push_back(Pair("nonce", (boost::uint64_t)block.nNonce));
result.push_back(Pair("bits", HexBits(block.nBits)));
result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
+ result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex()));
if (blockindex->pprev)
result.push_back(Pair("previousblockhash", blockindex->pprev->GetBlockHash().GetHex()));