diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -231,8 +231,8 @@ { {"timeout", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "0", - "Time in milliseconds to wait for a response. 0 " - "indicates no timeout."}, + "Time in milliseconds to wait for a response. 0 indicates no " + "timeout."}, }, RPCResult{"{ (json object)\n" " \"hash\" : { (string) The blockhash\n" @@ -1954,7 +1954,7 @@ /* default_val */ "one month", "Size of the window in number of blocks"}, {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, - /* default_val */ "", + /* default_val */ "chain tip", "The hash of the block that ends the window."}, }, RPCResult{ @@ -2094,8 +2094,8 @@ {"stats", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", - "Values to plot, by default all values (see result below)", + /* default_val */ "all values", + "Values to plot (see result below)", { {"height", RPCArg::Type::STR, /* opt */ true, /* default_val */ "", "Selected statistic"}, diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -756,9 +756,9 @@ {"hexdata", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "the hex-encoded block data to submit"}, {"dummy", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "dummy value, for compatibility with BIP22. This " - "value is ignored."}, + /* default_val */ "ignored", + "dummy value, for compatibility with BIP22. This value is " + "ignored."}, }, RPCResults{}, RPCExamples{HelpExampleCli("submitblock", "\"mydata\"") + diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -496,9 +496,8 @@ "Returns an object containing information about memory usage.\n", { {"mode", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "determines what kind of information is returned. This " - "argument is optional, the default mode is \"stats\".\n" + /* default_val */ "\"stats\"", + "determines what kind of information is returned.\n" " - \"stats\" returns general statistics about memory usage " "in the daemon.\n" " - \"mallocinfo\" returns an XML string describing " @@ -597,7 +596,7 @@ {"include", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "A json array of categories to add debug logging", { {"include_category", RPCArg::Type::STR, @@ -607,7 +606,7 @@ {"exclude", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "A json array of categories to remove debug logging", { {"exclude_category", RPCArg::Type::STR, diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -328,9 +328,10 @@ "string, or call using the named 'nodeid' argument only.\n", { {"address", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", "The IP address/port of the node"}, + /* default_val */ "fallback to nodeid", + "The IP address/port of the node"}, {"nodeid", RPCArg::Type::NUM, /* opt */ true, - /* default_val */ "", + /* default_val */ "fallback to address", "The node ID (see getpeerinfo for node IDs)"}, }, RPCResults{}, @@ -386,9 +387,9 @@ "(note that onetry addnodes are not listed here)\n", { {"node", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "If provided, return information about this " - "specific node, otherwise all nodes are returned."}, + /* default_val */ "all nodes", + "If provided, return information about this specific node, " + "otherwise all nodes are returned."}, }, RPCResult{ "[\n" @@ -672,15 +673,15 @@ "'add' to add an IP/Subnet to the list, 'remove' to " "remove an IP/Subnet from the list"}, {"bantime", RPCArg::Type::NUM, /* opt */ true, - /* default_val */ "", + /* default_val */ "0", "time in seconds how long (or until when if [absolute] is " - "set) the IP is banned (0 or empty means using the " - "default time of 24h which can also be overwritten by the " - "-bantime startup argument)"}, + "set) the IP is banned (0 or empty means using the default " + "time of 24h which can also be overwritten by the -bantime " + "startup argument)"}, {"absolute", RPCArg::Type::BOOL, /* opt */ true, - /* default_val */ "", - "If set, the bantime must be an absolute timestamp in " - "seconds since epoch (Jan 1 1970 GMT)"}, + /* default_val */ "false", + "If set, the bantime must be an absolute timestamp in seconds " + "since epoch (Jan 1 1970 GMT)"}, }, RPCResults{}, RPCExamples{ diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -96,7 +96,7 @@ "If false, return a string, otherwise return a json " "object"}, {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "The block in which to look for the transaction"}, }, { @@ -283,9 +283,8 @@ }, }, {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, - /* default_val */ "", - "If specified, looks for txid in the block with this " - "hash"}, + /* default_val */ "null", + "If specified, looks for txid in the block with this hash"}, }, RPCResult{"\"data\" (string) A string that is a " "serialized, hex-encoded data for the proof.\n"}, @@ -460,7 +459,7 @@ { "", RPCArg::Type::OBJ, - /* opt */ false, + /* opt */ true, /* default_val */ "", "", { @@ -469,8 +468,10 @@ "The transaction id"}, {"vout", RPCArg::Type::NUM, /* opt */ false, /* default_val */ "", "The output number"}, - {"sequence", RPCArg::Type::NUM, - /* opt */ true, /* default_val */ "", + {"sequence", RPCArg::Type::NUM, /* opt */ true, + /* default_val */ + "depends on the value of the 'locktime' " + "argument", "The sequence number"}, }, }, @@ -820,7 +821,7 @@ "prevtxs", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "A json array of previous dependent transaction outputs", { { @@ -839,7 +840,7 @@ /* opt */ false, /* default_val */ "", "script key"}, {"redeemScript", RPCArg::Type::STR_HEX, - /* opt */ true, /* default_val */ "", + /* opt */ true, /* default_val */ "omitted", "(required for P2SH) redeem script"}, {"amount", RPCArg::Type::AMOUNT, /* opt */ false, /* default_val */ "", @@ -1533,8 +1534,10 @@ "The transaction id"}, {"vout", RPCArg::Type::NUM, /* opt */ false, /* default_val */ "", "The output number"}, - {"sequence", RPCArg::Type::NUM, - /* opt */ true, /* default_val */ "", + {"sequence", RPCArg::Type::NUM, /* opt */ true, + /* default_val */ + "depends on the value of the 'locktime' " + "argument", "The sequence number"}, }, }, diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -183,7 +183,8 @@ "\nList all commands, or get help for a specified command.\n", { {"command", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", "The command to get help on"}, + /* default_val */ "all commands", + "The command to get help on"}, }, RPCResult{"\"text\" (string) The help text\n"}, RPCExamples{""}, diff --git a/src/rpc/util.h b/src/rpc/util.h --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -144,7 +144,7 @@ /** * Return the type string of the argument. - * Set oneline to allow it to be overrided by a custom oneline type string + * Set oneline to allow it to be overridden by a custom oneline type string * (m_oneline_description). */ std::string ToString(bool oneline) const; diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1652,8 +1652,8 @@ "be scanned.", /* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}}, - {"redeemscript", RPCArg::Type::STR, - /* opt */ true, /* default_val */ "omitted", + {"redeemscript", RPCArg::Type::STR, /* opt */ true, + /* default_val */ "omitted", "Allowed only if the scriptPubKey is a P2SH " "address/scriptPubKey"}, {"pubkeys", diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -169,12 +169,12 @@ "'label'.\n", { {"label", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "The label name for the address to be linked to. If not " - "provided, the default label \"\" is used. It can also be " - "set to the empty string \"\" to represent the default " - "label. The label does not need to exist, it will be " - "created if there is no label by the given name."}, + "provided, the default label \"\" is used. It can also be set " + "to the empty string \"\" to represent the default label. The " + "label does not need to exist, it will be created if there is " + "no label by the given name."}, }, RPCResult{"\"address\" (string) The new bitcoin address\n"}, RPCExamples{HelpExampleCli("getnewaddress", "") + @@ -427,14 +427,13 @@ /* default_val */ "", "The amount in " + CURRENCY_UNIT + " to send. eg 0.1"}, {"comment", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "A comment used to store what the transaction is for.\n" " This is not part of the " "transaction, just kept in your wallet."}, {"comment_to", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "A comment to store the name of the person or " - "organization\n" + /* default_val */ "null", + "A comment to store the name of the person or organization\n" " to which you're sending the " "transaction. This is not part of the \n" " transaction, just kept in " @@ -849,9 +848,9 @@ "as -spendzeroconfchange.\n", { {"dummy", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "Remains for backward compatibility. Must be " - "excluded or set to \"*\"."}, + /* default_val */ "null", + "Remains for backward compatibility. Must be excluded or set " + "to \"*\"."}, {"minconf", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "0", "Only include transactions confirmed at least this " @@ -970,12 +969,12 @@ "Only use the balance confirmed at least this many " "times."}, {"comment", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", "A comment"}, + /* default_val */ "null", "A comment"}, { "subtractfeefrom", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "A json array with addresses.\n" " The fee will be equally " "deducted from the amount of each selected address.\n" @@ -1179,7 +1178,7 @@ }, }, {"label", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "A label to assign the addresses to."}, }, RPCResult{"{\n" @@ -1434,7 +1433,7 @@ "Whether to include watch-only addresses (see " "'importaddress')."}, {"address_filter", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "If present, only return information on this address."}, }, RPCResult{ @@ -1653,7 +1652,7 @@ "first 'from' transactions.\n", { {"label", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "If set, should be a valid label name to return only incoming " "transactions with the specified label, or \"*\" to disable " "filtering and return all transactions."}, @@ -1833,8 +1832,9 @@ "array.\n", { {"blockhash", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "The block hash to list transactions since"}, + /* default_val */ "null", + "If set, the block hash to list transactions since, otherwise " + "list all transactions."}, {"target_confirmations", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "1", "Return the nth block hash from the main chain. e.g. 1 " @@ -2661,9 +2661,9 @@ "transactions", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", - "A json array of objects. Each object the txid " - "(string) vout (numeric)", + /* default_val */ "empty array", + "A json array of objects. Each object the txid (string) " + "vout (numeric).", { { "", @@ -3235,7 +3235,8 @@ "Specifying the wallet name on a wallet endpoint is invalid.", { {"wallet_name", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", "The name of the wallet to unload."}, + /* default_val */ "the wallet name from the RPC request", + "The name of the wallet to unload."}, }, RPCResults{}, RPCExamples{HelpExampleCli("unloadwallet", "wallet_name") + @@ -3298,7 +3299,7 @@ "addresses", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "empty array", "A json array of bitcoin addresses to filter", { {"address", RPCArg::Type::STR, /* opt */ true, @@ -3313,7 +3314,7 @@ {"query_options", RPCArg::Type::OBJ, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "JSON with query options", { {"minimumAmount", RPCArg::Type::AMOUNT, /* opt */ true, @@ -3669,9 +3670,9 @@ {"options", RPCArg::Type::OBJ, /* opt */ true, - /* default_val */ "", - "for backward compatibility: passing in a true instead of " - "an object will result in {\"includeWatching\":true}", + /* default_val */ "null", + "for backward compatibility: passing in a true instead of an " + "object will result in {\"includeWatching\":true}", { {"changeAddress", RPCArg::Type::STR, /* opt */ true, /* default_val */ "pool address", @@ -3692,14 +3693,11 @@ "subtractFeeFromOutputs", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "empty array", "A json array of integers.\n" " The fee will be " "equally deducted from the amount of each " "specified output.\n" - " The outputs are " - "specified by their zero-based index, before any " - "change output is added.\n" " Those recipients " "will receive less bitcoins than you enter in " "their corresponding amount field.\n" @@ -3786,9 +3784,8 @@ "prevtxs", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", - "A json array of previous dependent transaction " - "outputs", + /* default_val */ "null", + "A json array of previous dependent transaction outputs", { { "", @@ -3806,7 +3803,7 @@ /* opt */ false, /* default_val */ "", "script key"}, {"redeemScript", RPCArg::Type::STR_HEX, - /* opt */ true, /* default_val */ "", + /* opt */ true, /* default_val */ "omitted", "(required for P2SH)"}, {"amount", RPCArg::Type::AMOUNT, /* opt */ false, /* default_val */ "", @@ -3890,8 +3887,7 @@ /* default_val */ "", "How many blocks are generated immediately."}, {"maxtries", RPCArg::Type::NUM, /* opt */ true, - /* default_val */ "", - "How many iterations to try (default = 1000000)."}, + /* default_val */ "1000000", "How many iterations to try."}, }, RPCResult{ "[ blockhashes ] (array) hashes of blocks generated\n"}, @@ -3949,13 +3945,11 @@ "\nRescan the local blockchain for wallet related transactions.\n", { {"start_height", RPCArg::Type::NUM, /* opt */ true, - /* default_val */ "", + /* default_val */ "0", "block height where the rescan should start"}, {"stop_height", RPCArg::Type::NUM, /* opt */ true, - /* default_val */ "", - "the last block height that should be scanned. If none is " - "provided it will rescan up to the tip at return time of this " - "call."}, + /* default_val */ "tip height", + "the last block height that should be scanned"}, }, RPCResult{"{\n" " \"start_height\" (numeric) The block height where " @@ -4399,10 +4393,9 @@ "assigned to addresses with a specific purpose.\n", { {"purpose", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "Address purpose to list labels for " - "('send','receive'). An empty string is the same as not " - "providing this argument."}, + /* default_val */ "null", + "Address purpose to list labels for ('send','receive'). An " + "empty string is the same as not providing this argument."}, }, RPCResult{"[ (json array of string)\n" " \"label\", (string) Label name\n" @@ -4476,9 +4469,8 @@ " keypool will be used until it " "has been depleted."}, {"seed", RPCArg::Type::STR, /* opt */ true, - /* default_val */ "", - "The WIF private key to use as the new HD seed; if not " - "provided a random seed will be used.\n" + /* default_val */ "random seed", + "The WIF private key to use as the new HD seed.\n" " The seed value can be retrieved " "using the dumpwallet command. It is the private key marked " "hdseed=1"}, @@ -4700,7 +4692,7 @@ "", { {"address", RPCArg::Type::AMOUNT, - /* opt */ true, /* default_val */ "", + /* opt */ false, /* default_val */ "", "A key-value pair. The key (string) is the " "bitcoin address, the value (float or string) " "is the amount in " + @@ -4714,10 +4706,10 @@ /* default_val */ "", "", { - {"data", RPCArg::Type::STR_HEX, - /* opt */ true, /* default_val */ "", - "A key-value pair. The key must be " - "\"data\", the value is hex-encoded data"}, + {"data", RPCArg::Type::STR_HEX, /* opt */ false, + /* default_val */ "", + "A key-value pair. The key must be \"data\", " + "the value is hex-encoded data"}, }, }, }, @@ -4732,7 +4724,7 @@ {"options", RPCArg::Type::OBJ, /* opt */ true, - /* default_val */ "", + /* default_val */ "null", "", { {"changeAddress", RPCArg::Type::STR_HEX, @@ -4755,22 +4747,21 @@ "subtractFeeFromOutputs", RPCArg::Type::ARR, /* opt */ true, - /* default_val */ "", + /* default_val */ "empty array", "A json array of integers.\n" " The fee will be " "equally deducted from the amount of each specified " "output.\n" - " The outputs are " - "specified by their zero-based index, before any " - "change output is added.\n" " Those recipients will " "receive less bitcoins than you enter in their " "corresponding amount field.\n" " If no outputs are " "specified here, the sender pays the fee.", { - {"vout_index", RPCArg::Type::NUM, - /* opt */ true, /* default_val */ "", ""}, + {"vout_index", RPCArg::Type::NUM, /* opt */ true, + /* default_val */ "", + "The zero-based output index, before a change " + "output is added."}, }, }, },