Add anchor to output of getblock

Closes #2164.
This commit is contained in:
Jack Grigg
2017-03-10 20:04:14 +13:00
parent 00740e0358
commit 0bc1e2c431
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()));