From 7393f538e01029812803ba56823d330ae26b7ef9 Mon Sep 17 00:00:00 2001 From: Pavel Vasin Date: Sat, 12 Mar 2016 17:11:59 +0300 Subject: [PATCH] use cached block hash in blockToJSON() --- src/rpcblockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index ba08e89ab..368d0af4c 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -97,7 +97,7 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex) UniValue blockToDeltasJSON(const CBlock& block, const CBlockIndex* blockindex) { 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)) {