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:
1 parent
a78742830a
commit
f110b7c722
3 files changed
+5
-5
No files matched your search
+2
-2
@@ -1019,7 +1019,7 @@ static UniValue estimatesmartfee(const JSONRPCRequest& request)
|
|||||||
RPCResult::Type::OBJ, "", "",
|
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::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"},
|
{RPCResult::Type::STR, "", "error"},
|
||||||
}},
|
}},
|
||||||
@@ -1098,7 +1098,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
|
|||||||
{
|
{
|
||||||
{RPCResult::Type::ELISION, "", ""},
|
{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", ""},
|
{RPCResult::Type::STR, "error", ""},
|
||||||
}},
|
}},
|
||||||
|
|||||||
@@ -744,7 +744,7 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
|
|||||||
{
|
{
|
||||||
{RPCResult::Type::STR_HEX, "hex", "The hex-encoded raw transaction with signature(s)"},
|
{RPCResult::Type::STR_HEX, "hex", "The hex-encoded raw transaction with signature(s)"},
|
||||||
{RPCResult::Type::BOOL, "complete", "If the transaction has a complete set of signatures"},
|
{RPCResult::Type::BOOL, "complete", "If the transaction has a complete set of signatures"},
|
||||||
{RPCResult::Type::ARR, "errors", "Script verification errors (if there are any)",
|
{RPCResult::Type::ARR, "errors", /* optional */ true, "Script verification errors (if there are any)",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::OBJ, "", "",
|
{RPCResult::Type::OBJ, "", "",
|
||||||
{
|
{
|
||||||
@@ -1722,7 +1722,7 @@ UniValue analyzepsbt(const JSONRPCRequest& request)
|
|||||||
{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"},
|
{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"},
|
||||||
{RPCResult::Type::STR_AMOUNT, "fee", /* optional */ true, "The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled"},
|
{RPCResult::Type::STR_AMOUNT, "fee", /* optional */ true, "The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled"},
|
||||||
{RPCResult::Type::STR, "next", "Role of the next person that this psbt needs to go to"},
|
{RPCResult::Type::STR, "next", "Role of the next person that this psbt needs to go to"},
|
||||||
{RPCResult::Type::STR, "error", "Error message if there is one"},
|
{RPCResult::Type::STR, "error", /* optional */ true, "Error message (if there is one)"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RPCExamples {
|
RPCExamples {
|
||||||
|
|||||||
@@ -3165,7 +3165,7 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request)
|
|||||||
{
|
{
|
||||||
{RPCResult::Type::STR_HEX, "hex", "The hex-encoded raw transaction with signature(s)"},
|
{RPCResult::Type::STR_HEX, "hex", "The hex-encoded raw transaction with signature(s)"},
|
||||||
{RPCResult::Type::BOOL, "complete", "If the transaction has a complete set of signatures"},
|
{RPCResult::Type::BOOL, "complete", "If the transaction has a complete set of signatures"},
|
||||||
{RPCResult::Type::ARR, "errors", "Script verification errors (if there are any)",
|
{RPCResult::Type::ARR, "errors", /* optional */ true, "Script verification errors (if there are any)",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::OBJ, "", "",
|
{RPCResult::Type::OBJ, "", "",
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user