From e1dde421c36e7644e8c2592a1a2f56c55c0fa7b5 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 27 Aug 2016 23:50:49 +1200 Subject: [PATCH] Output Equihash solution in RPC results as a hex string --- src/rpcblockchain.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index ac7102265..20c669d5c 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -85,11 +85,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDe result.push_back(Pair("tx", txs)); result.push_back(Pair("time", block.GetBlockTime())); result.push_back(Pair("nonce", block.nNonce.GetHex())); - Array equihash_solution; - BOOST_FOREACH(uint32_t solution_index, block.nSolution) { - equihash_solution.push_back((size_t)(solution_index)); - } - result.push_back(Pair("solution", equihash_solution)); + result.push_back(Pair("solution", HexStr(block.nSolution))); result.push_back(Pair("bits", strprintf("%08x", block.nBits))); result.push_back(Pair("difficulty", GetDifficulty(blockindex))); result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex()));