@@ -61,6 +61,8 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
6161 result.push_back (Pair (" merkleroot" , blockindex->hashMerkleRoot .GetHex ()));
6262 result.push_back (Pair (" time" , (int64_t )blockindex->nTime ));
6363 result.push_back (Pair (" mediantime" , (int64_t )blockindex->GetMedianTimePast ()));
64+ result.push_back (Pair (" signblock_witness_asm" , ScriptToAsmStr (blockindex->proof .solution )));
65+ result.push_back (Pair (" signblock_witness_hex" , HexStr (blockindex->proof .solution .begin (), blockindex->proof .solution .end ())));
6466
6567 if (blockindex->pprev )
6668 result.push_back (Pair (" previousblockhash" , blockindex->pprev ->GetBlockHash ().GetHex ()));
@@ -101,6 +103,8 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
101103 result.push_back (Pair (" tx" , txs));
102104 result.push_back (Pair (" time" , block.GetBlockTime ()));
103105 result.push_back (Pair (" mediantime" , (int64_t )blockindex->GetMedianTimePast ()));
106+ result.push_back (Pair (" signblock_witness_asm" , ScriptToAsmStr (blockindex->proof .solution )));
107+ result.push_back (Pair (" signblock_witness_hex" , HexStr (blockindex->proof .solution .begin (), blockindex->proof .solution .end ())));
104108
105109 if (blockindex->pprev )
106110 result.push_back (Pair (" previousblockhash" , blockindex->pprev ->GetBlockHash ().GetHex ()));
@@ -600,6 +604,8 @@ UniValue getblockheader(const JSONRPCRequest& request)
600604 " \" merkleroot\" : \" xxxx\" , (string) The merkle root\n "
601605 " \" time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n "
602606 " \" mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n "
607+ " \" signblock_witness_asm\" :\" asm\" , (string) scriptSig for block signing (asm)'\n "
608+ " \" signblock_witness_hex\" :\" hex\" , (string) scriptSig for block signing (hex)'\n "
603609 " \" previousblockhash\" : \" hash\" , (string) The hash of the previous block\n "
604610 " \" nextblockhash\" : \" hash\" , (string) The hash of the next block\n "
605611 " }\n "
@@ -684,6 +690,8 @@ static UniValue getblock(const JSONRPCRequest& request)
684690 " ],\n "
685691 " \" time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n "
686692 " \" mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n "
693+ " \" signblock_witness_asm\" :\" asm\" , (string) scriptSig for block signing (asm)'\n "
694+ " \" signblock_witness_hex\" :\" hex\" , (string) scriptSig for block signing (hex)'\n "
687695 " \" previousblockhash\" : \" hash\" , (string) The hash of the previous block\n "
688696 " \" nextblockhash\" : \" hash\" (string) The hash of the next block\n "
689697 " }\n "
@@ -1033,6 +1041,8 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
10331041 " \n Result:\n "
10341042 " {\n "
10351043 " \" chain\" : \" xxxx\" , (string) current network name as defined in BIP70 (main, test, regtest)\n "
1044+ " \" signblock_asm\" :\" asm\" , (string) scriptPubKey for block signing (asm)'\n "
1045+ " \" signblock_hex\" :\" hex\" , (string) scriptPubKey for block signing (hex)'\n "
10361046 " \" blocks\" : xxxxxx, (numeric) the current number of blocks processed in the server\n "
10371047 " \" headers\" : xxxxxx, (numeric) the current number of headers we have validated\n "
10381048 " \" bestblockhash\" : \" ...\" , (string) the hash of the currently best block\n "
@@ -1066,6 +1076,8 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
10661076 obj.push_back (Pair (" mediantime" , (int64_t )tip->GetMedianTimePast ()));
10671077 obj.push_back (Pair (" verificationprogress" , GuessVerificationProgress (Params ().TxData (), tip)));
10681078 obj.push_back (Pair (" pruned" , fPruneMode ));
1079+ obj.push_back (Pair (" signblock_asm" , ScriptToAsmStr (tip->proof .challenge )));
1080+ obj.push_back (Pair (" signblock_hex" , HexStr (tip->proof .challenge .begin (), tip->proof .challenge .end ())));
10691081
10701082 const Consensus::Params& consensusParams = Params ().GetConsensus ();
10711083 UniValue bip9_softforks (UniValue::VOBJ);
0 commit comments