Navigation Menu

Skip to content

Commit

Permalink
use cached block hash in blockToJSON()
Browse files Browse the repository at this point in the history
  • Loading branch information
recursive-rat4 committed Mar 12, 2016
1 parent 0fa88ef commit a6ee0ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/blockchain.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit a6ee0ca

Please sign in to comment.