Permalink
Browse files

Merge #7670: use cached block hash in blockToJSON()

a6ee0ca use cached block hash in blockToJSON() (Pavel Vasin)
  • Loading branch information...
laanwj committed Mar 14, 2016
2 parents c87f51e + a6ee0ca commit c9a12657545f477961a2ecb2ccf3e3f00bc7f9f7
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/rpc/blockchain.cpp
View
@@ -89,7 +89,7 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false)
{
UniValue result(UniValue::VOBJ);
result.push_back(Pair("hash", block.GetHash().GetHex()));
result.push_back(Pair("hash", blockindex->GetBlockHash().GetHex()));
int confirmations = -1;
// Only report confirmations if the block is on the main chain
if (chainActive.Contains(blockindex))

0 comments on commit c9a1265

Please sign in to comment.