Auto merge of #3337 - str4d:getblock-finalsaplingroot, r=bitcartel
Add hashFinalSaplingRoot to getblockheader and getblock output
This commit is contained in:
commit
f24d1ff546
|
@ -108,6 +108,7 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
|
||||||
result.push_back(Pair("height", blockindex->nHeight));
|
result.push_back(Pair("height", blockindex->nHeight));
|
||||||
result.push_back(Pair("version", blockindex->nVersion));
|
result.push_back(Pair("version", blockindex->nVersion));
|
||||||
result.push_back(Pair("merkleroot", blockindex->hashMerkleRoot.GetHex()));
|
result.push_back(Pair("merkleroot", blockindex->hashMerkleRoot.GetHex()));
|
||||||
|
result.push_back(Pair("finalsaplingroot", blockindex->hashFinalSaplingRoot.GetHex()));
|
||||||
result.push_back(Pair("time", (int64_t)blockindex->nTime));
|
result.push_back(Pair("time", (int64_t)blockindex->nTime));
|
||||||
result.push_back(Pair("nonce", blockindex->nNonce.GetHex()));
|
result.push_back(Pair("nonce", blockindex->nNonce.GetHex()));
|
||||||
result.push_back(Pair("solution", HexStr(blockindex->nSolution)));
|
result.push_back(Pair("solution", HexStr(blockindex->nSolution)));
|
||||||
|
@ -136,6 +137,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
|
||||||
result.push_back(Pair("height", blockindex->nHeight));
|
result.push_back(Pair("height", blockindex->nHeight));
|
||||||
result.push_back(Pair("version", block.nVersion));
|
result.push_back(Pair("version", block.nVersion));
|
||||||
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
|
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
|
||||||
|
result.push_back(Pair("finalsaplingroot", block.hashFinalSaplingRoot.GetHex()));
|
||||||
UniValue txs(UniValue::VARR);
|
UniValue txs(UniValue::VARR);
|
||||||
BOOST_FOREACH(const CTransaction&tx, block.vtx)
|
BOOST_FOREACH(const CTransaction&tx, block.vtx)
|
||||||
{
|
{
|
||||||
|
@ -352,6 +354,7 @@ UniValue getblockheader(const UniValue& params, bool fHelp)
|
||||||
" \"height\" : n, (numeric) The block height or index\n"
|
" \"height\" : n, (numeric) The block height or index\n"
|
||||||
" \"version\" : n, (numeric) The block version\n"
|
" \"version\" : n, (numeric) The block version\n"
|
||||||
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
|
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
|
||||||
|
" \"finalsaplingroot\" : \"xxxx\", (string) The root of the Sapling commitment tree after applying this block\n"
|
||||||
" \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
|
" \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
|
||||||
" \"nonce\" : n, (numeric) The nonce\n"
|
" \"nonce\" : n, (numeric) The nonce\n"
|
||||||
" \"bits\" : \"1d00ffff\", (string) The bits\n"
|
" \"bits\" : \"1d00ffff\", (string) The bits\n"
|
||||||
|
@ -412,6 +415,7 @@ UniValue getblock(const UniValue& params, bool fHelp)
|
||||||
" \"height\" : n, (numeric) The block height or index (same as provided height)\n"
|
" \"height\" : n, (numeric) The block height or index (same as provided height)\n"
|
||||||
" \"version\" : n, (numeric) The block version\n"
|
" \"version\" : n, (numeric) The block version\n"
|
||||||
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
|
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
|
||||||
|
" \"finalsaplingroot\" : \"xxxx\", (string) The root of the Sapling commitment tree after applying this block\n"
|
||||||
" \"tx\" : [ (array of string) The transaction ids\n"
|
" \"tx\" : [ (array of string) The transaction ids\n"
|
||||||
" \"transactionid\" (string) The transaction id\n"
|
" \"transactionid\" (string) The transaction id\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
|
|
Loading…
Reference in New Issue