aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-02-05 14:51:43 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-02-05 14:54:42 +0100
commit712b7d9b479dd68c0b410cf45407f11de0b64f79 (patch)
tree5f085244f5cb226df4b6570693a56f2e40b9a46c
parentb30a1f3e39aae7c5828d508fcd12d107afaa5a6d (diff)
parentfa5c6622c8ecf1954e7177888ad8c97a77b16fb7 (diff)
Merge #17804: doc: Misc RPC help fixes
fa5c6622c8ecf1954e7177888ad8c97a77b16fb7 doc: Use proper RPC help syntax in importmulti (MarcoFalke) fab63111bec73859597e6ce0986f76e5e9959091 doc: Remove duplicate "comment" from listsinceblock RPC help (MarcoFalke) fa04cd6cfc0330b62058ed169d621e08108dc87e doc: Properly document proxy_randomize_credentials as bool in getnetworkinfo (MarcoFalke) fa9dec7c395897e8dbbb6de7a16ec5185a609d41 doc: Fix syntax error (trailing square bracket) in finalizepsbt (MarcoFalke) faff5a60ed328d4c5fdef253e8935a351cb57bd0 doc: Fix syntax error (trailing square bracket) in walletprocesspsbt (MarcoFalke) fa0545901daad32b09511cc61c4af1400c48088d 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: #14601 and #14459) ACKs for top commit: laanwj: ACK fa5c6622c8ecf1954e7177888ad8c97a77b16fb7 Tree-SHA512: 5a10956e12f8ce23e93a2ce8bafd6cae759d8a21658f79397e3bfce3e4aabd9658bdbd40acde49323dca958a9befee7166654994208c182dd60f483109621e17
-rw-r--r--src/rpc/mining.cpp20
-rw-r--r--src/rpc/net.cpp30
-rw-r--r--src/rpc/rawtransaction.cpp9
-rw-r--r--src/wallet/rpcdump.cpp15
-rw-r--r--src/wallet/rpcwallet.cpp23
5 files changed, 58 insertions, 39 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index e5994b172b..69885546c8 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -908,7 +908,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
" lower buckets."},
},
RPCResult{
- "{\n"
+ "{ (json object) Results are returned for any horizon which tracks blocks up to the confirmation target\n"
" \"short\" : { (json object, optional) estimate for short time horizon\n"
" \"feerate\" : x.x, (numeric, optional) estimate fee rate in " + CURRENCY_UNIT + "/kB\n"
" \"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)
" \"inmempool\" : x.x, (numeric) current number of txs in mempool in the feerate range unconfirmed for at least target blocks\n"
" \"leftmempool\" : x.x, (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target\n"
" },\n"
- " \"fail\" : { ... }, (json object, optional) information about the highest range of feerates to fail to meet the threshold\n"
- " \"errors\": [ str... ] (json array of strings, optional) Errors encountered during processing\n"
+ " \"fail\" : { (json object, optional) information about the highest range of feerates to fail to meet the threshold\n"
+ " ...\n"
+ " },\n"
+ " \"errors\": [ (json array, optional) Errors encountered during processing\n"
+ " \"str\", (string)\n"
+ " ...\n"
+ " ],\n"
+ " },\n"
+ " \"medium\" : { (json object, optional) estimate for medium time horizon\n"
+ " ...\n"
+ " },\n"
+ " \"long\" : { (json object, optional) estimate for long time horizon\n"
+ " ...\n"
" },\n"
- " \"medium\" : { ... }, (json object, optional) estimate for medium time horizon\n"
- " \"long\" : { ... } (json object) estimate for long time horizon\n"
"}\n"
"\n"
- "Results are returned for any horizon which tracks blocks up to the confirmation target.\n"
},
RPCExamples{
HelpExampleCli("estimaterawfee", "6 0.9")
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 1ce49709b2..42aec08b45 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -452,11 +452,11 @@ static UniValue getnetworkinfo(const JSONRPCRequest& request)
"Returns an object containing various state info regarding P2P networking.\n",
{},
RPCResult{
- "{\n"
+ "{ (json object)\n"
" \"version\": xxxxx, (numeric) the server version\n"
- " \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n"
+ " \"subversion\" : \"str\", (string) the server subversion string\n"
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
- " \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
+ " \"localservices\" : \"hex\", (string) the services we offer to the network\n"
" \"localservicesnames\": [ (array) the services we offer to the network, in human-readable form\n"
" \"SERVICE_NAME\", (string) the service name\n"
" ...\n"
@@ -466,26 +466,26 @@ static UniValue getnetworkinfo(const JSONRPCRequest& request)
" \"connections\": xxxxx, (numeric) the number of connections\n"
" \"networkactive\": true|false, (bool) whether p2p networking is enabled\n"
" \"networks\": [ (array) information per network\n"
- " {\n"
- " \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
+ " { (json object)\n"
+ " \"name\": \"str\", (string) network (ipv4, ipv6 or onion)\n"
" \"limited\": true|false, (boolean) is the network limited using -onlynet?\n"
" \"reachable\": true|false, (boolean) is the network reachable?\n"
- " \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
- " \"proxy_randomize_credentials\": true|false, (string) Whether randomized credentials are used\n"
- " }\n"
- " ,...\n"
+ " \"proxy\" : \"str\" (string) (\"host:port\") the proxy that is used for this network, or empty if none\n"
+ " \"proxy_randomize_credentials\" : true|false, (bool) Whether randomized credentials are used\n"
+ " },\n"
+ " ...\n"
" ],\n"
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
" \"incrementalfee\": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in " + CURRENCY_UNIT + "/kB\n"
" \"localaddresses\": [ (array) list of local addresses\n"
- " {\n"
- " \"address\": \"xxxx\", (string) network address\n"
+ " { (json object)\n"
+ " \"address\" : \"xxxx\", (string) network address\n"
" \"port\": xxx, (numeric) network port\n"
" \"score\": xxx (numeric) relative score\n"
- " }\n"
- " ,...\n"
- " ]\n"
- " \"warnings\": \"...\" (string) any network and blockchain warnings\n"
+ " },\n"
+ " ...\n"
+ " ],\n"
+ " \"warnings\" : \"str\", (string) any network and blockchain warnings\n"
"}\n"
},
RPCExamples{
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index cea59b2c7a..972809a65b 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1292,11 +1292,10 @@ UniValue finalizepsbt(const JSONRPCRequest& request)
" extract and return the complete transaction in normal network serialization instead of the PSBT."},
},
RPCResult{
- "{\n"
- " \"psbt\" : \"value\", (string) The base64-encoded partially signed transaction if not extracted\n"
- " \"hex\" : \"value\", (string) The hex-encoded network transaction if extracted\n"
- " \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n"
- " ]\n"
+ "{ (json object)\n"
+ " \"psbt\" : \"str\", (string) The base64-encoded partially signed transaction if not extracted\n"
+ " \"hex\" : \"hex\", (string) The hex-encoded network transaction if extracted\n"
+ " \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n"
"}\n"
},
RPCExamples{
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index b730d4a4dd..7e704a95fe 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -1321,8 +1321,19 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
"\"options\""},
},
RPCResult{
- "\nResponse is an array with the same size as the input that has the execution result :\n"
- " [{\"success\": true}, {\"success\": true, \"warnings\": [\"Ignoring irrelevant private key\"]}, {\"success\": false, \"error\": {\"code\": -1, \"message\": \"Internal Server Error\"}}, ...]\n"
+ "[ (json array) Response is an array with the same size as the input that has the execution result\n"
+ " { (json object)\n"
+ " \"success\" : true|false, (boolean)\n"
+ " \"warnings\" : [ (json array, optional)\n"
+ " \"str\", (string)\n"
+ " ...\n"
+ " ],\n"
+ " \"error\" : { (json object, optional)\n"
+ " ... JSONRPC error\n"
+ " },\n"
+ " },\n"
+ " ...\n"
+ "]\n"
},
RPCExamples{
HelpExampleCli("importmulti", "'[{ \"scriptPubKey\": { \"address\": \"<my address>\" }, \"timestamp\":1455191478 }, "
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index ab0819a821..00c4a7427a 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -1387,7 +1387,7 @@ static const std::string TransactionDescriptionString()
" \"time\": xxx, (numeric) The transaction time expressed in " + UNIX_EPOCH_TIME + ".\n"
" \"timereceived\": xxx, (numeric) The time received expressed in " + UNIX_EPOCH_TIME + ".\n"
" \"comment\": \"...\", (string) If a comment is associated with the transaction, only present if not empty.\n"
- " \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
+ " \"bip125-replaceable\" : \"str\", (string) (\"yes|no|unknown\") Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
" may be unknown for unconfirmed transactions not in the mempool\n";
}
@@ -1535,11 +1535,12 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
" (not guaranteed to work on pruned nodes)"},
},
RPCResult{
- "{\n"
- " \"transactions\": [\n"
+ "{ (json object)\n"
+ " \"transactions\" : [ (json array)\n"
+ " { (json object)\n"
" \"involvesWatchonly\": xxx, (bool) Only returns true if imported addresses were involved in transaction.\n"
- " \"address\":\"address\", (string) The bitcoin address of the transaction.\n"
- " \"category\": (string) The transaction category.\n"
+ " \"address\" : \"str\", (string) The bitcoin address of the transaction.\n"
+ " \"category\" : \"str\", (string) The transaction category.\n"
" \"send\" Transactions sent.\n"
" \"receive\" Non-coinbase transactions received.\n"
" \"generate\" Coinbase transactions received with more than 100 confirmations.\n"
@@ -1551,15 +1552,16 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
" \"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"
+ TransactionDescriptionString()
+ " \"abandoned\": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.\n"
- " \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
" \"label\" : \"label\" (string) A comment for the address/transaction, if any\n"
" \"to\": \"...\", (string) If a comment to is associated with the transaction.\n"
+ " },\n"
+ " ...\n"
" ],\n"
- " \"removed\": [\n"
+ " \"removed\": [ (json array)\n"
" <structure is the same as \"transactions\" above, only present if include_removed=true>\n"
" 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"
" ],\n"
- " \"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"
+ " \"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"
"}\n"
},
RPCExamples{
@@ -4079,10 +4081,9 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request)
{"bip32derivs", RPCArg::Type::BOOL, /* default */ "false", "If true, includes the BIP 32 derivation paths for public keys if we know them"},
},
RPCResult{
- "{\n"
- " \"psbt\" : \"value\", (string) The base64-encoded partially signed transaction\n"
+ "{ (json object)\n"
+ " \"psbt\" : \"str\", (string) The base64-encoded partially signed transaction\n"
" \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n"
- " ]\n"
"}\n"
},
RPCExamples{