diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-03-14 12:01:09 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-03-14 12:22:40 +0100 |
| commit | c9a12657545f477961a2ecb2ccf3e3f00bc7f9f7 (patch) | |
| tree | 6be5c3636006c532f80b656b21c23f83bf8acc13 /src/rpc/blockchain.cpp | |
| parent | Merge #7663: Make the generate RPC call function for non-regtest (diff) | |
| parent | use cached block hash in blockToJSON() (diff) | |
| download | discoin-c9a12657545f477961a2ecb2ccf3e3f00bc7f9f7.tar.xz discoin-c9a12657545f477961a2ecb2ccf3e3f00bc7f9f7.zip | |
Merge #7670: use cached block hash in blockToJSON()
a6ee0ca use cached block hash in blockToJSON() (Pavel Vasin)
Diffstat (limited to 'src/rpc/blockchain.cpp')
| -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)) |