Skip to content

Commit

Permalink
Merge #799: Add current_params_root key to getblockchaininfo
Browse files Browse the repository at this point in the history
5196b88 Add current_params_root key to getblockchaininfo (Steven Roose)

Pull request description:

Tree-SHA512: eb87803a4ce1a9593fb0aff3a16020459b4c77911921910fe1117974c952fb1a01724d73efc7d5c13862a4d39646b584c683aa521ab6e5145cc3be207fefd16b
  • Loading branch information
instagibbs committed Dec 19, 2019
2 parents 526e802 + 5196b88 commit f3e8ef2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
" \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n"
" \"size_on_disk\": xxxxxx, (numeric) the estimated size of the block and undo files on disk\n"
" \"pruned\": xx, (boolean) if the blocks are subject to pruning\n"
" \"current_params_root\": \"xxxx\", (string) the root of the currently active dynafed params in hex\n"
" \"signblock_asm\" : \"xxxx\", (string) ASM of sign block challenge data from genesis block.\n"
" \"signblock_hex\" : \"xxxx\", (string) Hex of sign block challenge data from genesis block.\n"
" \"current_signblock_asm\" : \"xxxx\", (string) ASM of sign block challenge data enforced on the next block.\n"
Expand Down Expand Up @@ -1459,6 +1460,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
obj.pushKV("extension_space", arr);
} else {
const DynaFedParamEntry entry = ComputeNextBlockFullCurrentParameters(chainActive.Tip(), chainparams.GetConsensus());
obj.pushKV("current_params_root", entry.CalculateRoot().GetHex());
obj.pushKV("current_signblock_asm", ScriptToAsmStr(entry.m_signblockscript));
obj.pushKV("current_signblock_hex", HexStr(entry.m_signblockscript));
obj.pushKV("max_block_witness", (uint64_t)entry.m_signblock_witness_limit);
Expand Down

0 comments on commit f3e8ef2

Please sign in to comment.