rpc: Correct RPCHelpMan for fundrawtransaction's input_weights field

input_weights is incorrectly documented as a fixed length JSON array,
but it is actually a JSON array of JSON objects - this commit changes
input_weights to use RPCArg::Type::OBJ
This commit is contained in:
jdjkelly@gmail.com
2023-01-02 14:31:49 -05:00
parent d8bdee0fc8
commit 927b8d4e0c

View File

@@ -762,6 +762,8 @@ RPCHelpMan fundrawtransaction()
}, },
}, },
{"input_weights", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "Inputs and their corresponding weights", {"input_weights", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "Inputs and their corresponding weights",
{
{"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "",
{ {
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"}, {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output index"}, {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output index"},
@@ -773,6 +775,8 @@ RPCHelpMan fundrawtransaction()
}, },
}, },
}, },
},
},
FundTxDoc()), FundTxDoc()),
RPCArgOptions{.oneline_description="options"}}, RPCArgOptions{.oneline_description="options"}},
{"iswitness", RPCArg::Type::BOOL, RPCArg::DefaultHint{"depends on heuristic tests"}, "Whether the transaction hex is a serialized witness transaction.\n" {"iswitness", RPCArg::Type::BOOL, RPCArg::DefaultHint{"depends on heuristic tests"}, "Whether the transaction hex is a serialized witness transaction.\n"