You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"\nBy default, this call only returns a transaction if it is in the mempool. If -txindex is enabled\n"
173
+
"By default, this call only returns a transaction if it is in the mempool. If -txindex is enabled\n"
172
174
"and no blockhash argument is passed, it will return the transaction if it is in the mempool or any block.\n"
173
175
"If a blockhash argument is passed, it will return the transaction if\n"
174
-
"the specified block is available and the transaction is in that block.\n"
175
-
"\nHint: Use gettransaction for wallet transactions.\n"
176
+
"the specified block is available and the transaction is in that block.\n\n"
177
+
"Hint: Use gettransaction for wallet transactions.\n\n"
176
178
177
-
"\nIf verbose is 'true', returns an Object with information about 'txid'.\n"
178
-
"If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.",
179
+
"If verbosity is 0 or omitted, returns the serialized transaction as a hex-encoded string.\n"
180
+
"If verbosity is 1, returns a JSON Object with information about transaction.\n"
181
+
"If verbosity is 2, returns a JSON Object with information about transaction, including fee and prevout information.",
179
182
{
180
183
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
181
-
{"verbose", RPCArg::Type::BOOL, RPCArg::Default{false}, "If false, return a string, otherwise return a json object"},
184
+
{"verbosity|verbose", RPCArg::Type::NUM, RPCArg::Default{0}, "0 for hex-encoded data, 1 for a JSON object, and 2 for JSON object with fee and prevout"},
182
185
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED_NAMED_ARG, "The block in which to look for the transaction"},
183
186
},
184
187
{
185
-
RPCResult{"if verbose is not set or set to false",
186
-
RPCResult::Type::STR, "data", "The serialized, hex-encoded data for 'txid'"
188
+
RPCResult{"if verbosity is not set or set to 0",
189
+
RPCResult::Type::STR, "data", "The serialized transaction as a hex-encoded string for 'txid'"
187
190
},
188
-
RPCResult{"if verbose is set to true",
191
+
RPCResult{"if verbosity is set to 1",
192
+
// When updating this documentation, update `decoderawtransaction` in the same way.
assert_raises_rpc_error(-5, "The genesis block coinbase is not considered an ordinary transaction", self.nodes[0].getrawtransaction, block['merkleroot'])
0 commit comments