Skip to content

Commit 712b7d9

Browse files
committed
Merge bitcoin#17804: doc: Misc RPC help fixes
fa5c662 doc: Use proper RPC help syntax in importmulti (MarcoFalke) fab6311 doc: Remove duplicate "comment" from listsinceblock RPC help (MarcoFalke) fa04cd6 doc: Properly document proxy_randomize_credentials as bool in getnetworkinfo (MarcoFalke) fa9dec7 doc: Fix syntax error (trailing square bracket) in finalizepsbt (MarcoFalke) faff5a6 doc: Fix syntax error (trailing square bracket) in walletprocesspsbt (MarcoFalke) fa05459 doc: Add missing "optional" to "long" estimaterawfee RPC help (MarcoFalke) Pull request description: This fixes documentation of the following RPCs: * estimaterawfee (hidden) * https://bitcoincore.org/en/doc/0.19.0/rpc/wallet/walletprocesspsbt/ * https://bitcoincore.org/en/doc/0.19.0/rpc/rawtransactions/finalizepsbt/ * https://bitcoincore.org/en/doc/0.19.0/rpc/network/getnetworkinfo/ * https://bitcoincore.org/en/doc/0.19.0/rpc/wallet/listsinceblock/ * https://bitcoincore.org/en/doc/0.19.0/rpc/wallet/importmulti/ <!-- Also, it comes with a scripted diff to normalize whitespace and type names. (Previous attempts: bitcoin#14601 and bitcoin#14459) ACKs for top commit: laanwj: ACK fa5c662 Tree-SHA512: 5a10956e12f8ce23e93a2ce8bafd6cae759d8a21658f79397e3bfce3e4aabd9658bdbd40acde49323dca958a9befee7166654994208c182dd60f483109621e17
2 parents b30a1f3 + fa5c662 commit 712b7d9

File tree

5 files changed

+58
-39
lines changed

5 files changed

+58
-39
lines changed

src/rpc/mining.cpp

+14-6
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
908908
" lower buckets."},
909909
},
910910
RPCResult{
911-
"{\n"
911+
"{ (json object) Results are returned for any horizon which tracks blocks up to the confirmation target\n"
912912
" \"short\" : { (json object, optional) estimate for short time horizon\n"
913913
" \"feerate\" : x.x, (numeric, optional) estimate fee rate in " + CURRENCY_UNIT + "/kB\n"
914914
" \"decay\" : x.x, (numeric) exponential decay (per block) for historical moving average of confirmation data\n"
@@ -921,14 +921,22 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
921921
" \"inmempool\" : x.x, (numeric) current number of txs in mempool in the feerate range unconfirmed for at least target blocks\n"
922922
" \"leftmempool\" : x.x, (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target\n"
923923
" },\n"
924-
" \"fail\" : { ... }, (json object, optional) information about the highest range of feerates to fail to meet the threshold\n"
925-
" \"errors\": [ str... ] (json array of strings, optional) Errors encountered during processing\n"
924+
" \"fail\" : { (json object, optional) information about the highest range of feerates to fail to meet the threshold\n"
925+
" ...\n"
926+
" },\n"
927+
" \"errors\": [ (json array, optional) Errors encountered during processing\n"
928+
" \"str\", (string)\n"
929+
" ...\n"
930+
" ],\n"
931+
" },\n"
932+
" \"medium\" : { (json object, optional) estimate for medium time horizon\n"
933+
" ...\n"
934+
" },\n"
935+
" \"long\" : { (json object, optional) estimate for long time horizon\n"
936+
" ...\n"
926937
" },\n"
927-
" \"medium\" : { ... }, (json object, optional) estimate for medium time horizon\n"
928-
" \"long\" : { ... } (json object) estimate for long time horizon\n"
929938
"}\n"
930939
"\n"
931-
"Results are returned for any horizon which tracks blocks up to the confirmation target.\n"
932940
},
933941
RPCExamples{
934942
HelpExampleCli("estimaterawfee", "6 0.9")

src/rpc/net.cpp

+15-15
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,11 @@ static UniValue getnetworkinfo(const JSONRPCRequest& request)
452452
"Returns an object containing various state info regarding P2P networking.\n",
453453
{},
454454
RPCResult{
455-
"{\n"
455+
"{ (json object)\n"
456456
" \"version\": xxxxx, (numeric) the server version\n"
457-
" \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n"
457+
" \"subversion\" : \"str\", (string) the server subversion string\n"
458458
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
459-
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
459+
" \"localservices\" : \"hex\", (string) the services we offer to the network\n"
460460
" \"localservicesnames\": [ (array) the services we offer to the network, in human-readable form\n"
461461
" \"SERVICE_NAME\", (string) the service name\n"
462462
" ...\n"
@@ -466,26 +466,26 @@ static UniValue getnetworkinfo(const JSONRPCRequest& request)
466466
" \"connections\": xxxxx, (numeric) the number of connections\n"
467467
" \"networkactive\": true|false, (bool) whether p2p networking is enabled\n"
468468
" \"networks\": [ (array) information per network\n"
469-
" {\n"
470-
" \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
469+
" { (json object)\n"
470+
" \"name\": \"str\", (string) network (ipv4, ipv6 or onion)\n"
471471
" \"limited\": true|false, (boolean) is the network limited using -onlynet?\n"
472472
" \"reachable\": true|false, (boolean) is the network reachable?\n"
473-
" \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
474-
" \"proxy_randomize_credentials\": true|false, (string) Whether randomized credentials are used\n"
475-
" }\n"
476-
" ,...\n"
473+
" \"proxy\" : \"str\" (string) (\"host:port\") the proxy that is used for this network, or empty if none\n"
474+
" \"proxy_randomize_credentials\" : true|false, (bool) Whether randomized credentials are used\n"
475+
" },\n"
476+
" ...\n"
477477
" ],\n"
478478
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
479479
" \"incrementalfee\": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in " + CURRENCY_UNIT + "/kB\n"
480480
" \"localaddresses\": [ (array) list of local addresses\n"
481-
" {\n"
482-
" \"address\": \"xxxx\", (string) network address\n"
481+
" { (json object)\n"
482+
" \"address\" : \"xxxx\", (string) network address\n"
483483
" \"port\": xxx, (numeric) network port\n"
484484
" \"score\": xxx (numeric) relative score\n"
485-
" }\n"
486-
" ,...\n"
487-
" ]\n"
488-
" \"warnings\": \"...\" (string) any network and blockchain warnings\n"
485+
" },\n"
486+
" ...\n"
487+
" ],\n"
488+
" \"warnings\" : \"str\", (string) any network and blockchain warnings\n"
489489
"}\n"
490490
},
491491
RPCExamples{

src/rpc/rawtransaction.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -1292,11 +1292,10 @@ UniValue finalizepsbt(const JSONRPCRequest& request)
12921292
" extract and return the complete transaction in normal network serialization instead of the PSBT."},
12931293
},
12941294
RPCResult{
1295-
"{\n"
1296-
" \"psbt\" : \"value\", (string) The base64-encoded partially signed transaction if not extracted\n"
1297-
" \"hex\" : \"value\", (string) The hex-encoded network transaction if extracted\n"
1298-
" \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n"
1299-
" ]\n"
1295+
"{ (json object)\n"
1296+
" \"psbt\" : \"str\", (string) The base64-encoded partially signed transaction if not extracted\n"
1297+
" \"hex\" : \"hex\", (string) The hex-encoded network transaction if extracted\n"
1298+
" \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n"
13001299
"}\n"
13011300
},
13021301
RPCExamples{

src/wallet/rpcdump.cpp

+13-2
Original file line numberDiff line numberDiff line change
@@ -1321,8 +1321,19 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
13211321
"\"options\""},
13221322
},
13231323
RPCResult{
1324-
"\nResponse is an array with the same size as the input that has the execution result :\n"
1325-
" [{\"success\": true}, {\"success\": true, \"warnings\": [\"Ignoring irrelevant private key\"]}, {\"success\": false, \"error\": {\"code\": -1, \"message\": \"Internal Server Error\"}}, ...]\n"
1324+
"[ (json array) Response is an array with the same size as the input that has the execution result\n"
1325+
" { (json object)\n"
1326+
" \"success\" : true|false, (boolean)\n"
1327+
" \"warnings\" : [ (json array, optional)\n"
1328+
" \"str\", (string)\n"
1329+
" ...\n"
1330+
" ],\n"
1331+
" \"error\" : { (json object, optional)\n"
1332+
" ... JSONRPC error\n"
1333+
" },\n"
1334+
" },\n"
1335+
" ...\n"
1336+
"]\n"
13261337
},
13271338
RPCExamples{
13281339
HelpExampleCli("importmulti", "'[{ \"scriptPubKey\": { \"address\": \"<my address>\" }, \"timestamp\":1455191478 }, "

src/wallet/rpcwallet.cpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ static const std::string TransactionDescriptionString()
13871387
" \"time\": xxx, (numeric) The transaction time expressed in " + UNIX_EPOCH_TIME + ".\n"
13881388
" \"timereceived\": xxx, (numeric) The time received expressed in " + UNIX_EPOCH_TIME + ".\n"
13891389
" \"comment\": \"...\", (string) If a comment is associated with the transaction, only present if not empty.\n"
1390-
" \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
1390+
" \"bip125-replaceable\" : \"str\", (string) (\"yes|no|unknown\") Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
13911391
" may be unknown for unconfirmed transactions not in the mempool\n";
13921392
}
13931393

@@ -1535,11 +1535,12 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
15351535
" (not guaranteed to work on pruned nodes)"},
15361536
},
15371537
RPCResult{
1538-
"{\n"
1539-
" \"transactions\": [\n"
1538+
"{ (json object)\n"
1539+
" \"transactions\" : [ (json array)\n"
1540+
" { (json object)\n"
15401541
" \"involvesWatchonly\": xxx, (bool) Only returns true if imported addresses were involved in transaction.\n"
1541-
" \"address\":\"address\", (string) The bitcoin address of the transaction.\n"
1542-
" \"category\": (string) The transaction category.\n"
1542+
" \"address\" : \"str\", (string) The bitcoin address of the transaction.\n"
1543+
" \"category\" : \"str\", (string) The transaction category.\n"
15431544
" \"send\" Transactions sent.\n"
15441545
" \"receive\" Non-coinbase transactions received.\n"
15451546
" \"generate\" Coinbase transactions received with more than 100 confirmations.\n"
@@ -1551,15 +1552,16 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
15511552
" \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the 'send' category of transactions.\n"
15521553
+ TransactionDescriptionString()
15531554
+ " \"abandoned\": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.\n"
1554-
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
15551555
" \"label\" : \"label\" (string) A comment for the address/transaction, if any\n"
15561556
" \"to\": \"...\", (string) If a comment to is associated with the transaction.\n"
1557+
" },\n"
1558+
" ...\n"
15571559
" ],\n"
1558-
" \"removed\": [\n"
1560+
" \"removed\": [ (json array)\n"
15591561
" <structure is the same as \"transactions\" above, only present if include_removed=true>\n"
15601562
" Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count.\n"
15611563
" ],\n"
1562-
" \"lastblock\": \"lastblockhash\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n"
1564+
" \"lastblock\": \"hex\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n"
15631565
"}\n"
15641566
},
15651567
RPCExamples{
@@ -4079,10 +4081,9 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request)
40794081
{"bip32derivs", RPCArg::Type::BOOL, /* default */ "false", "If true, includes the BIP 32 derivation paths for public keys if we know them"},
40804082
},
40814083
RPCResult{
4082-
"{\n"
4083-
" \"psbt\" : \"value\", (string) The base64-encoded partially signed transaction\n"
4084+
"{ (json object)\n"
4085+
" \"psbt\" : \"str\", (string) The base64-encoded partially signed transaction\n"
40844086
" \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n"
4085-
" ]\n"
40864087
"}\n"
40874088
},
40884089
RPCExamples{

0 commit comments

Comments
 (0)