Skip to content

Commit be99270

Browse files
author
MarcoFalke
committed
Merge #14373: Consistency fixes for RPC descriptions
b8edb98 [rpc] Descriptions: Textual consistency fixes (Jon Layton) Pull request description: Tree-SHA512: fa22ddac94e95672579cc84309f1c3ea3a2dbf762e45a8ae9c121c4c5188bf8c19ff9458d49dd7ef760c3ae4226487612a2954e9a1a0e8b720116afeb718b46b
2 parents dc8e6d0 + b8edb98 commit be99270

File tree

5 files changed

+38
-38
lines changed

5 files changed

+38
-38
lines changed

src/rpc/blockchain.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static UniValue getbestblockhash(const JSONRPCRequest& request)
182182
"getbestblockhash\n"
183183
"\nReturns the hash of the best (tip) block in the longest blockchain.\n"
184184
"\nResult:\n"
185-
"\"hex\" (string) the block hash hex encoded\n"
185+
"\"hex\" (string) the block hash, hex-encoded\n"
186186
"\nExamples:\n"
187187
+ HelpExampleCli("getbestblockhash", "")
188188
+ HelpExampleRpc("getbestblockhash", "")
@@ -509,17 +509,17 @@ static UniValue getmempoolancestors(const JSONRPCRequest& request)
509509
{
510510
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2) {
511511
throw std::runtime_error(
512-
"getmempoolancestors txid (verbose)\n"
512+
"getmempoolancestors txid ( verbose )\n"
513513
"\nIf txid is in the mempool, returns all in-mempool ancestors.\n"
514514
"\nArguments:\n"
515515
"1. \"txid\" (string, required) The transaction id (must be in mempool)\n"
516516
"2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n"
517-
"\nResult (for verbose=false):\n"
517+
"\nResult (for verbose = false):\n"
518518
"[ (json array of strings)\n"
519519
" \"transactionid\" (string) The transaction id of an in-mempool ancestor transaction\n"
520520
" ,...\n"
521521
"]\n"
522-
"\nResult (for verbose=true):\n"
522+
"\nResult (for verbose = true):\n"
523523
"{ (json object)\n"
524524
" \"transactionid\" : { (json object)\n"
525525
+ EntryDescriptionString()
@@ -573,17 +573,17 @@ static UniValue getmempooldescendants(const JSONRPCRequest& request)
573573
{
574574
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2) {
575575
throw std::runtime_error(
576-
"getmempooldescendants txid (verbose)\n"
576+
"getmempooldescendants txid ( verbose )\n"
577577
"\nIf txid is in the mempool, returns all in-mempool descendants.\n"
578578
"\nArguments:\n"
579579
"1. \"txid\" (string, required) The transaction id (must be in mempool)\n"
580580
"2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n"
581-
"\nResult (for verbose=false):\n"
581+
"\nResult (for verbose = false):\n"
582582
"[ (json array of strings)\n"
583583
" \"transactionid\" (string) The transaction id of an in-mempool descendant transaction\n"
584584
" ,...\n"
585585
"]\n"
586-
"\nResult (for verbose=true):\n"
586+
"\nResult (for verbose = true):\n"
587587
"{ (json object)\n"
588588
" \"transactionid\" : { (json object)\n"
589589
+ EntryDescriptionString()
@@ -700,7 +700,7 @@ static UniValue getblockheader(const JSONRPCRequest& request)
700700
"If verbose is true, returns an Object with information about blockheader <hash>.\n"
701701
"\nArguments:\n"
702702
"1. \"hash\" (string, required) The block hash\n"
703-
"2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n"
703+
"2. verbose (boolean, optional, default=true) true for a json object, false for the hex-encoded data\n"
704704
"\nResult (for verbose = true):\n"
705705
"{\n"
706706
" \"hash\" : \"hash\", (string) the block hash (same as provided)\n"
@@ -779,7 +779,7 @@ static UniValue getblock(const JSONRPCRequest& request)
779779
"If verbosity is 2, returns an Object with information about block <hash> and information about each transaction. \n"
780780
"\nArguments:\n"
781781
"1. \"blockhash\" (string, required) The block hash\n"
782-
"2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data\n"
782+
"2. verbosity (numeric, optional, default=1) 0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data\n"
783783
"\nResult (for verbosity = 0):\n"
784784
"\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n"
785785
"\nResult (for verbosity = 1):\n"
@@ -1046,7 +1046,7 @@ UniValue gettxout(const JSONRPCRequest& request)
10461046
+ HelpExampleCli("listunspent", "") +
10471047
"\nView the details\n"
10481048
+ HelpExampleCli("gettxout", "\"txid\" 1") +
1049-
"\nAs a json rpc call\n"
1049+
"\nAs a JSON-RPC call\n"
10501050
+ HelpExampleRpc("gettxout", "\"txid\", 1")
10511051
);
10521052

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ static UniValue estimatesmartfee(const JSONRPCRequest& request)
813813
" higher feerate and is more likely to be sufficient for the desired\n"
814814
" target, but is not as responsive to short term drops in the\n"
815815
" prevailing fee market. Must be one of:\n"
816-
" \"UNSET\" (defaults to CONSERVATIVE)\n"
816+
" \"UNSET\"\n"
817817
" \"ECONOMICAL\"\n"
818818
" \"CONSERVATIVE\"\n"
819819
"\nResult:\n"

src/rpc/misc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static UniValue validateaddress(const JSONRPCRequest& request)
4444
"{\n"
4545
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
4646
" \"address\" : \"address\", (string) The bitcoin address validated\n"
47-
" \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n"
47+
" \"scriptPubKey\" : \"hex\", (string) The hex-encoded scriptPubKey generated by the address\n"
4848
" \"isscript\" : true|false, (boolean) If the key is a script\n"
4949
" \"iswitness\" : true|false, (boolean) If the address is a witness address\n"
5050
" \"witness_version\" : version (numeric, optional) The version number of the witness program\n"
@@ -99,7 +99,7 @@ static UniValue createmultisig(const JSONRPCRequest& request)
9999
"\nExamples:\n"
100100
"\nCreate a multisig address from 2 public keys\n"
101101
+ HelpExampleCli("createmultisig", "2 \"[\\\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\\\",\\\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\\\"]\"") +
102-
"\nAs a json rpc call\n"
102+
"\nAs a JSON-RPC call\n"
103103
+ HelpExampleRpc("createmultisig", "2, \"[\\\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\\\",\\\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\\\"]\"")
104104
;
105105
throw std::runtime_error(msg);
@@ -157,7 +157,7 @@ static UniValue verifymessage(const JSONRPCRequest& request)
157157
+ HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"") +
158158
"\nVerify the signature\n"
159159
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"") +
160-
"\nAs json rpc\n"
160+
"\nAs a JSON-RPC call\n"
161161
+ HelpExampleRpc("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"signature\", \"my message\"")
162162
);
163163

@@ -210,7 +210,7 @@ static UniValue signmessagewithprivkey(const JSONRPCRequest& request)
210210
+ HelpExampleCli("signmessagewithprivkey", "\"privkey\" \"my message\"") +
211211
"\nVerify the signature\n"
212212
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"") +
213-
"\nAs json rpc\n"
213+
"\nAs a JSON-RPC call\n"
214214
+ HelpExampleRpc("signmessagewithprivkey", "\"privkey\", \"my message\"")
215215
);
216216

src/rpc/rawtransaction.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,13 @@ static UniValue createrawtransaction(const JSONRPCRequest& request)
466466
" \"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in " + CURRENCY_UNIT + "\n"
467467
" },\n"
468468
" {\n"
469-
" \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex encoded data\n"
469+
" \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex-encoded data\n"
470470
" }\n"
471471
" ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n"
472472
" accepted as second parameter.\n"
473473
" ]\n"
474474
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
475-
"4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.\n"
475+
"4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125-replaceable.\n"
476476
" Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
477477
"\nResult:\n"
478478
"\"transaction\" (string) hex string of the transaction\n"
@@ -581,11 +581,11 @@ static UniValue decodescript(const JSONRPCRequest& request)
581581
"decodescript \"hexstring\"\n"
582582
"\nDecode a hex-encoded script.\n"
583583
"\nArguments:\n"
584-
"1. \"hexstring\" (string) the hex encoded script\n"
584+
"1. \"hexstring\" (string) the hex-encoded script\n"
585585
"\nResult:\n"
586586
"{\n"
587587
" \"asm\":\"asm\", (string) Script public key\n"
588-
" \"hex\":\"hex\", (string) hex encoded public key\n"
588+
" \"hex\":\"hex\", (string) hex-encoded public key\n"
589589
" \"type\":\"type\", (string) The output type\n"
590590
" \"reqSigs\": n, (numeric) The required signatures\n"
591591
" \"addresses\": [ (json array of string)\n"
@@ -922,7 +922,7 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
922922
" }\n"
923923
" ,...\n"
924924
" ]\n"
925-
"4. \"sighashtype\" (string, optional, default=ALL) The signature hash type. Must be one of\n"
925+
"4. \"sighashtype\" (string, optional, default=ALL) The signature hash type. Must be one of:\n"
926926
" \"ALL\"\n"
927927
" \"NONE\"\n"
928928
" \"SINGLE\"\n"
@@ -999,7 +999,7 @@ static UniValue sendrawtransaction(const JSONRPCRequest& request)
999999
+ HelpExampleCli("signrawtransactionwithwallet", "\"myhex\"") +
10001000
"\nSend the transaction (signed hex)\n"
10011001
+ HelpExampleCli("sendrawtransaction", "\"signedhex\"") +
1002-
"\nAs a json rpc call\n"
1002+
"\nAs a JSON-RPC call\n"
10031003
+ HelpExampleRpc("sendrawtransaction", "\"signedhex\"")
10041004
);
10051005

@@ -1104,7 +1104,7 @@ static UniValue testmempoolaccept(const JSONRPCRequest& request)
11041104
+ HelpExampleCli("signrawtransactionwithwallet", "\"myhex\"") +
11051105
"\nTest acceptance of the transaction (signed hex)\n"
11061106
+ HelpExampleCli("testmempoolaccept", "\"signedhex\"") +
1107-
"\nAs a json rpc call\n"
1107+
"\nAs a JSON-RPC call\n"
11081108
+ HelpExampleRpc("testmempoolaccept", "[\"signedhex\"]")
11091109
// clang-format on
11101110
);
@@ -1587,7 +1587,7 @@ UniValue createpsbt(const JSONRPCRequest& request)
15871587
" \"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in " + CURRENCY_UNIT + "\n"
15881588
" },\n"
15891589
" {\n"
1590-
" \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex encoded data\n"
1590+
" \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex-encoded data\n"
15911591
" }\n"
15921592
" ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n"
15931593
" accepted as second parameter.\n"

0 commit comments

Comments
 (0)