From c36e0f10905a4de6613ea223ccfd6e17fbdc737b Mon Sep 17 00:00:00 2001 From: Pavel Vasin Date: Fri, 29 Nov 2019 15:10:43 +0200 Subject: [PATCH] use cached block hash in blockToJSON() --- src/rpcblockchain.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 054dca2..69e436c 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -102,7 +102,7 @@ double GetPoSKernelPS() Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPrintTransactionDetail) { Object result; - result.push_back(Pair("hash", block.GetHash().GetHex())); + result.push_back(Pair("hash", blockindex->GetBlockHash().GetHex())); CMerkleTx txGen(block.vtx[0]); txGen.SetMerkleBranch(&block); result.push_back(Pair("confirmations", (int)txGen.GetDepthInMainChain())); -- 1.7.1