Skip to content

Commit

Permalink
getauxblock: fix previousblockhash
Browse files Browse the repository at this point in the history
  • Loading branch information
fflo committed Apr 24, 2016
1 parent 77df708 commit 2ecd497
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bitcoinrpc.cpp
Expand Up @@ -2520,8 +2520,7 @@ Value getauxblock(const Array& params, bool fHelp)
// result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget))));
result.push_back(Pair("hash", pblock->GetHash().GetHex()));
result.push_back(Pair("chainid", pblock->GetChainID()));
if (blockindex->pprev)
obj.push_back(Pair("previousblockhash", block.hashPrevBlock.ToString().c_str()));
result.push_back(Pair("previousblockhash", pblock->hashPrevBlock.GetHex()));
result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue));
result.push_back(Pair("bits", HexBits(pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
Expand Down

0 comments on commit 2ecd497

Please sign in to comment.