Auto merge of #2168 - str4d:2164-getblock-anchor, r=daira

Add anchor to output of getblock

Closes #2164.
This commit is contained in:
zkbot
2017-03-23 18:21:10 +00:00
3 changed files with 26 additions and 0 deletions

View File

@@ -131,6 +131,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
result.push_back(Pair("bits", strprintf("%08x", block.nBits)));
result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex()));
result.push_back(Pair("anchor", blockindex->hashAnchorEnd.GetHex()));
if (blockindex->pprev)
result.push_back(Pair("previousblockhash", blockindex->pprev->GetBlockHash().GetHex()));