rpc: Document getblock RPC finalorchardroot field, omit before NU5
This commit is contained in:
parent
92d6984842
commit
62dce234be
|
@ -222,6 +222,9 @@ UniValue blockToDeltasJSON(const CBlock& block, const CBlockIndex* blockindex)
|
||||||
UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false)
|
UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false)
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_main);
|
AssertLockHeld(cs_main);
|
||||||
|
bool nu5Active = Params().GetConsensus().NetworkUpgradeActive(
|
||||||
|
blockindex->nHeight, Consensus::UPGRADE_NU5);
|
||||||
|
|
||||||
UniValue result(UniValue::VOBJ);
|
UniValue result(UniValue::VOBJ);
|
||||||
result.pushKV("hash", block.GetHash().GetHex());
|
result.pushKV("hash", block.GetHash().GetHex());
|
||||||
int confirmations = -1;
|
int confirmations = -1;
|
||||||
|
@ -236,7 +239,9 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
|
||||||
result.pushKV("blockcommitments", blockindex->hashBlockCommitments.GetHex());
|
result.pushKV("blockcommitments", blockindex->hashBlockCommitments.GetHex());
|
||||||
result.pushKV("authdataroot", blockindex->hashAuthDataRoot.GetHex());
|
result.pushKV("authdataroot", blockindex->hashAuthDataRoot.GetHex());
|
||||||
result.pushKV("finalsaplingroot", blockindex->hashFinalSaplingRoot.GetHex());
|
result.pushKV("finalsaplingroot", blockindex->hashFinalSaplingRoot.GetHex());
|
||||||
result.pushKV("finalorchardroot", blockindex->hashFinalOrchardRoot.GetHex());
|
if (nu5Active) {
|
||||||
|
result.pushKV("finalorchardroot", blockindex->hashFinalOrchardRoot.GetHex());
|
||||||
|
}
|
||||||
result.pushKV("chainhistoryroot", blockindex->hashChainHistoryRoot.GetHex());
|
result.pushKV("chainhistoryroot", blockindex->hashChainHistoryRoot.GetHex());
|
||||||
UniValue txs(UniValue::VARR);
|
UniValue txs(UniValue::VARR);
|
||||||
for (const CTransaction&tx : block.vtx)
|
for (const CTransaction&tx : block.vtx)
|
||||||
|
@ -707,6 +712,9 @@ UniValue getblock(const UniValue& params, bool fHelp)
|
||||||
" \"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"
|
" \"finalsaplingroot\" : \"xxxx\", (string) The root of the Sapling commitment tree after applying this block\n"
|
||||||
|
" \"finalorchardroot\" : \"xxxx\", (string) The root of the Orchard commitment tree after applying this block.\n"
|
||||||
|
" Omitted for blocks prior to NU5 activation. This will be the null\n"
|
||||||
|
" hash if this block has never been connected to a main chain.\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