rpc: document returned error fields as optional if applicable

Affects the following RPCs:
- analyzepsbt
- estimatesmartfee
- signrawtransactionwithkey
- signrawtransactionwithwallet

For the RPC estimaterawfee, the description message was adapted
to match the other optional ones.
This commit is contained in:
Sebastian Falbesoner
2020-08-02 18:35:18 +02:00
parent a78742830a
commit f110b7c722
3 changed files with 5 additions and 5 deletions

View File

@@ -1019,7 +1019,7 @@ static UniValue estimatesmartfee(const JSONRPCRequest& request)
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::NUM, "feerate", /* optional */ true, "estimate fee rate in " + CURRENCY_UNIT + "/kB (only present if no errors were encountered)"},
{RPCResult::Type::ARR, "errors", "Errors encountered during processing",
{RPCResult::Type::ARR, "errors", /* optional */ true, "Errors encountered during processing (if there are any)",
{
{RPCResult::Type::STR, "", "error"},
}},
@@ -1098,7 +1098,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
{
{RPCResult::Type::ELISION, "", ""},
}},
{RPCResult::Type::ARR, "errors", /* optional */ true, "Errors encountered during processing",
{RPCResult::Type::ARR, "errors", /* optional */ true, "Errors encountered during processing (if there are any)",
{
{RPCResult::Type::STR, "error", ""},
}},