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
PR 16866 renamed the 'decode' argument in gettransaction to 'verbose' to make it more consistent with other RPC calls like getrawtransaction.
However, it seems it inadvertently overloaded the 'details' fields when 'verbose' is passed. The result is that the original 'details' fields are no longer returned, which seems to be a breaking API change.
This PR takes the simplest path to restoring the 'details' fields by renaming them from 'details' back to 'decoded', while leaving the 'verbose' argument for API consistency.
It also addresses [this comment](bitcoin/bitcoin#16185 (comment)) to mention that the 'decoded' field is identical to decoderawtransaction.
Update the RPC help, functional test, and release note.
The `gettransaction` RPC now accepts a third (boolean) argument `verbose`. If set to `true`, a new `details` field will be added to the response containing additional transaction details.
3
+
The `gettransaction` RPC now accepts a third (boolean) argument `verbose`. If
4
+
set to `true`, a new `decoded` field will be added to the response containing
5
+
the decoded transaction. This field is equivalent to RPC `decoderawtransaction`,
6
+
or RPC `getrawtransaction` when `verbose` is passed.
"\nGet detailed information about in-wallet transaction <txid>\n",
1649
1649
{
1650
1650
{"txid", RPCArg::Type::STR, RPCArg::Optional::NO, "The transaction id"},
1651
-
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Whether to include watch-only addresses in balance calculation and details[]"},
1652
-
{"verbose", RPCArg::Type::BOOL, /* default */"false", "Whether to add a field with additional transaction details"},
1651
+
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false",
1652
+
"Whether to include watch-only addresses in balance calculation and details[]"},
"\"hex\" : \"data\" (string) Raw data for transaction\n"
1688
-
"\"details\" : transaction (json object) Optional, additional transaction details. This object contains the same transaction details as the `getrawtransaction` RPC method\n"
1690
+
"\"decoded\" : transaction (json object) Optional, the decoded transaction (only present when `verbose` is passed), equivalent to the\n"
1691
+
" RPC decoderawtransaction method, or the RPC getrawtransaction method when `verbose` is passed.\n"
0 commit comments