@@ -62,6 +62,7 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
6262 result.push_back (Pair (" merkleroot" , blockindex->hashMerkleRoot .GetHex ()));
6363 result.push_back (Pair (" time" , (int64_t )blockindex->nTime ));
6464 result.push_back (Pair (" mediantime" , (int64_t )blockindex->GetMedianTimePast ()));
65+ result.push_back (Pair (" nTx" , (uint64_t )blockindex->nTx ));
6566 result.push_back (Pair (" signblock_witness_asm" , ScriptToAsmStr (blockindex->proof .solution )));
6667 result.push_back (Pair (" signblock_witness_hex" , HexStr (blockindex->proof .solution )));
6768
@@ -104,6 +105,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
104105 result.push_back (Pair (" tx" , txs));
105106 result.push_back (Pair (" time" , block.GetBlockTime ()));
106107 result.push_back (Pair (" mediantime" , (int64_t )blockindex->GetMedianTimePast ()));
108+ result.push_back (Pair (" nTx" , (int64_t )blockindex->nTx ));
107109 result.push_back (Pair (" signblock_witness_asm" , ScriptToAsmStr (blockindex->proof .solution )));
108110 result.push_back (Pair (" signblock_witness_hex" , HexStr (blockindex->proof .solution )));
109111
@@ -605,8 +607,7 @@ UniValue getblockheader(const JSONRPCRequest& request)
605607 " \" merkleroot\" : \" xxxx\" , (string) The merkle root\n "
606608 " \" time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n "
607609 " \" mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n "
608- " \" signblock_witness_asm\" :\" asm\" , (string) scriptSig for block signing (asm)'\n "
609- " \" signblock_witness_hex\" :\" hex\" , (string) scriptSig for block signing (hex)'\n "
610+ " \" nTx\" : n, (numeric) The number of transactions in the block.\n "
610611 " \" previousblockhash\" : \" hash\" , (string) The hash of the previous block\n "
611612 " \" nextblockhash\" : \" hash\" , (string) The hash of the next block\n "
612613 " }\n "
@@ -691,8 +692,7 @@ static UniValue getblock(const JSONRPCRequest& request)
691692 " ],\n "
692693 " \" time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n "
693694 " \" mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n "
694- " \" signblock_witness_asm\" :\" asm\" , (string) scriptSig for block signing (asm)'\n "
695- " \" signblock_witness_hex\" :\" hex\" , (string) scriptSig for block signing (hex)'\n "
695+ " \" nTx\" : n, (numeric) The number of transactions in the block.\n "
696696 " \" previousblockhash\" : \" hash\" , (string) The hash of the previous block\n "
697697 " \" nextblockhash\" : \" hash\" (string) The hash of the next block\n "
698698 " }\n "
0 commit comments