diff options
author | jdjkelly@gmail.com <jdjkelly@gmail.com> | 2023-01-02 14:31:49 -0500 |
---|---|---|
committer | jdjkelly@gmail.com <jdjkelly@gmail.com> | 2023-01-02 14:31:49 -0500 |
commit | 927b8d4e0cddd89e1f71093c10bd697c25b7a7d8 (patch) | |
tree | fd0eb215d2045497a0bc6fde792711614c84c9b6 | |
parent | d8bdee0fc889def7c5f5076da13db4fce0a3728a (diff) | |
download | bitcoin-927b8d4e0cddd89e1f71093c10bd697c25b7a7d8.tar.xz |
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
-rw-r--r-- | src/wallet/rpc/spend.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index 5f31c1d72c..be1ad37592 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -763,13 +763,17 @@ RPCHelpMan fundrawtransaction() }, {"input_weights", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "Inputs and their corresponding weights", { - {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"}, - {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output index"}, - {"weight", RPCArg::Type::NUM, RPCArg::Optional::NO, "The maximum weight for this input, " - "including the weight of the outpoint and sequence number. " - "Note that serialized signature sizes are not guaranteed to be consistent, " - "so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures." - "Remember to convert serialized sizes to weight units when necessary."}, + {"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "", + { + {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"}, + {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output index"}, + {"weight", RPCArg::Type::NUM, RPCArg::Optional::NO, "The maximum weight for this input, " + "including the weight of the outpoint and sequence number. " + "Note that serialized signature sizes are not guaranteed to be consistent, " + "so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures." + "Remember to convert serialized sizes to weight units when necessary."}, + }, + }, }, }, }, |