diff options
| author | Pavel Vasin <[email protected]> | 2016-03-12 17:11:59 +0300 |
|---|---|---|
| committer | Pavel Vasin <[email protected]> | 2016-03-12 17:11:59 +0300 |
| commit | a6ee0caa4e5a6459f49995ac2dfd40e2444f7c04 (patch) | |
| tree | f32ad676fb9993bbda1bfb671ea4fd22f498f5fa /src | |
| parent | Merge #7635: [Documentation] Add dependency info to test docs (diff) | |
| download | discoin-a6ee0caa4e5a6459f49995ac2dfd40e2444f7c04.tar.xz discoin-a6ee0caa4e5a6459f49995ac2dfd40e2444f7c04.zip | |
use cached block hash in blockToJSON()
Diffstat (limited to 'src')
| -rw-r--r-- | src/rpc/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index de6bda4ea..da57973da 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -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)) |