Skip to content

Commit 927b8d4

Browse files
committed
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
1 parent d8bdee0 commit 927b8d4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/wallet/rpc/spend.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -763,13 +763,17 @@ RPCHelpMan fundrawtransaction()
763763
},
764764
{"input_weights", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "Inputs and their corresponding weights",
765765
{
766-
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
767-
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output index"},
768-
{"weight", RPCArg::Type::NUM, RPCArg::Optional::NO, "The maximum weight for this input, "
769-
"including the weight of the outpoint and sequence number. "
770-
"Note that serialized signature sizes are not guaranteed to be consistent, "
771-
"so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures."
772-
"Remember to convert serialized sizes to weight units when necessary."},
766+
{"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "",
767+
{
768+
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
769+
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output index"},
770+
{"weight", RPCArg::Type::NUM, RPCArg::Optional::NO, "The maximum weight for this input, "
771+
"including the weight of the outpoint and sequence number. "
772+
"Note that serialized signature sizes are not guaranteed to be consistent, "
773+
"so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures."
774+
"Remember to convert serialized sizes to weight units when necessary."},
775+
},
776+
},
773777
},
774778
},
775779
},

0 commit comments

Comments
 (0)