It would be good to have accurate RPC docs, so that humans and machines can read them and rely on them.
This fixes one issue.
It would be good to have accurate RPC docs, so that humans and machines can read them and rely on them.
This fixes one issue.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31416.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | rkrux |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
rendered diff:
0diff --git a/send b/send
1index 8c3edb7..45b8716 100644
2--- a/send
3+++ b/send
4@@ -51,12 +51,14 @@ fee_rate (numeric or string, optional, default=not set, fall
5 include_watching (boolean, optional, default=true for watch-only wallets, otherwise false) Also select inputs which are watch only.
6 Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported,
7 e.g. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field.
8-inputs (json array, optional, default=[]) Specify inputs instead of adding them automatically. A JSON array of JSON objects
9+inputs (json array, optional, default=[]) Specify inputs instead of adding them automatically.
10 [
11- "txid", (string, required) The transaction id
12- vout, (numeric, required) The output number
13- sequence, (numeric, required) The sequence number
14- weight, (numeric, optional, default=Calculated from wallet and solving data) The maximum weight for this input, including the weight of the outpoint and sequence number. Note that 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.
15+ { (json object)
16+ "txid": "hex", (string, required) The transaction id
17+ "vout": n, (numeric, required) The output number
18+ "sequence": n, (numeric, optional, default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number
19+ "weight": n, (numeric, optional, default=Calculated from wallet and solving data) The maximum weight for this input, including the weight of the outpoint and sequence number. Note that 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.
20+ },
21 ...
22 ]
23 locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs
1232+ {"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "", {
1233 {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
1234 {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output number"},
1235- {"sequence", RPCArg::Type::NUM, RPCArg::Optional::NO, "The sequence number"},
1236+ {"sequence", RPCArg::Type::NUM, RPCArg::DefaultHint{"depends on the value of the 'replaceable' and 'locktime' arguments"}, "The sequence number"},
1237 {"weight", RPCArg::Type::NUM, RPCArg::DefaultHint{"Calculated from wallet and solving data"}, "The maximum weight for this input, "
To be consistent with other default hints.
0 {"weight", RPCArg::Type::NUM, RPCArg::DefaultHint{"calculated from wallet and solving data"}, "The maximum weight for this input, "
1236+ {"sequence", RPCArg::Type::NUM, RPCArg::DefaultHint{"depends on the value of the 'replaceable' and 'locktime' arguments"}, "The sequence number"},
1237 {"weight", RPCArg::Type::NUM, RPCArg::DefaultHint{"Calculated from wallet and solving data"}, "The maximum weight for this input, "
1238 "including the weight of the outpoint and sequence number. "
1239 "Note that signature sizes are not guaranteed to be consistent, "
1240 "so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures."
1241 "Remember to convert serialized sizes to weight units when necessary."},
0 "so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures. "
1 "Remember to convert serialized sizes to weight units when necessary."},
tACK fad83e759a4a6221fb3b067657f847894e5a2f20
Thanks, the CLI output looks much better now. Left couple suggestions that are not in this diff though but are close by.
New
0inputs (json array, optional, default=[]) Specify inputs instead of adding them automatically.
1 [
2 { (json object)
3 "txid": "hex", (string, required) The transaction id
4 "vout": n, (numeric, required) The output number
5 "sequence": n, (numeric, optional, default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number
6 "weight": n, (numeric, optional, default=Calculated from wallet and solving data) The maximum weight for this input, including the weight of the outpoint and sequence number. Note that 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.
7 },
8 ...
9 ]
Old
0inputs (json array, optional, default=[]) Specify inputs instead of adding them automatically. A JSON array of JSON objects
1 [
2 "txid", (string, required) The transaction id
3 vout, (numeric, required) The output number
4 sequence, (numeric, required) The sequence number
5 weight, (numeric, optional, default=Calculated from wallet and solving data) The maximum weight for this input, including the weight of the outpoint and sequence number. Note that 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.
6 ...
7 ]