@@ -62,6 +62,7 @@ void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fInclud
6262void TxToJSON (const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
6363{
6464 entry.push_back (Pair (" txid" , tx.GetHash ().GetHex ()));
65+ entry.push_back (Pair (" size" , (int )::GetSerializeSize (tx, SER_NETWORK, PROTOCOL_VERSION)));
6566 entry.push_back (Pair (" version" , tx.nVersion ));
6667 entry.push_back (Pair (" locktime" , (int64_t )tx.nLockTime ));
6768 UniValue vin (UniValue::VARR);
@@ -133,6 +134,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
133134 " {\n "
134135 " \" hex\" : \" data\" , (string) The serialized, hex-encoded data for 'txid'\n "
135136 " \" txid\" : \" id\" , (string) The transaction id (same as provided)\n "
137+ " \" size\" : n, (numeric) The transaction size\n "
136138 " \" version\" : n, (numeric) The version\n "
137139 " \" locktime\" : ttt, (numeric) The lock time\n "
138140 " \" vin\" : [ (array of json objects)\n "
@@ -429,6 +431,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
429431 " \n Result:\n "
430432 " {\n "
431433 " \" txid\" : \" id\" , (string) The transaction id\n "
434+ " \" size\" : n, (numeric) The transaction size\n "
432435 " \" version\" : n, (numeric) The version\n "
433436 " \" locktime\" : ttt, (numeric) The lock time\n "
434437 " \" vin\" : [ (array of json objects)\n "
0 commit comments