Skip to content

Commit cbbeec6

Browse files
thephezUdjinM6
authored andcommitted
RPC Getrawtransaction fix (#3065)
* Remove duplicate hex field from getrawtransaction * Add missing height to help output
1 parent 1e34967 commit cbbeec6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
122122

123123
"\nResult (if verbose is set to true):\n"
124124
"{\n"
125-
" \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n"
126125
" \"txid\" : \"id\", (string) The transaction id (same as provided)\n"
127126
" \"size\" : n, (numeric) The transaction size\n"
128127
" \"version\" : n, (numeric) The version\n"
@@ -158,7 +157,9 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
158157
" ],\n"
159158
" \"extraPayloadSize\" : n (numeric) Size of DIP2 extra payload. Only present if it's a special TX\n"
160159
" \"extraPayload\" : \"hex\" (string) Hex encoded DIP2 extra payload data. Only present if it's a special TX\n"
160+
" \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n"
161161
" \"blockhash\" : \"hash\", (string) the block hash\n"
162+
" \"height\" : n, (numeric) The block height\n"
162163
" \"confirmations\" : n, (numeric) The confirmations\n"
163164
" \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n"
164165
" \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
@@ -208,7 +209,6 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
208209
return strHex;
209210

210211
UniValue result(UniValue::VOBJ);
211-
result.push_back(Pair("hex", strHex));
212212
TxToJSON(*tx, hashBlock, result);
213213
return result;
214214
}

0 commit comments

Comments
 (0)