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
Merge #19644: rpc: document returned error fields as optional if applicable
f110b7c rpc: document returned error fields as optional if applicable (Sebastian Falbesoner)
Pull request description:
The following RPCs return error fields (named `"error"` or `"errors"`) that are optional, but don't show up as optional in the help text yet:
* `analyzepsbt`
* `estimatesmartfee`
* `signrawtransactionwithkey`
* `signrawtransactionwithwallet`
The following RPC has the errors field already marked as optional, but doesn't match the usual format in the description (like `"if there are any"` in parantheses):
* `estimaterawfee`
This PR adds the missing optional flags and adapts the description strings. Inspired by a recent PR #19634 by justinmoon.
The instances were found via `git grep "RPCResult.*\"error"`. Note that there is one RPC so far where the return error is not optional (i.e. in case of no error, the field is included in the result, but is just empty), namely `bumpfee`.
ACKs for top commit:
adaminsky:
ACK `f110b7c`
laanwj:
ACK f110b7c, new documentation looks consistent with actual behavior
achow101:
ACK f110b7c
meshcollider:
utACK f110b7c
Tree-SHA512: 30c00f78a575b60e32b4536496af986d53a25f33e6ebbf553adcdcf825ad21a44f90267f3d1ea53326dac83bcfa9983fdb3dad6d3126e20f97f3c08ce286e188
{RPCResult::Type::STR_AMOUNT, "estimated_feerate", /* optional */true, "Estimated feerate of the final signed transaction in " + CURRENCY_UNIT + "/kB. Shown only if all UTXO slots in the PSBT have been filled"},
1723
1723
{RPCResult::Type::STR_AMOUNT, "fee", /* optional */true, "The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled"},
1724
1724
{RPCResult::Type::STR, "next", "Role of the next person that this psbt needs to go to"},
1725
-
{RPCResult::Type::STR, "error", "Error message if there is one"},
1725
+
{RPCResult::Type::STR, "error", /* optional */true, "Error message (if there is one)"},
0 commit comments