mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
doc: Rework generate* doc
Can be reviewed with --word-diff-regex=. --ignore-all-space
This commit is contained in:
parent
cf22191fd8
commit
fa30e62cc6
3 changed files with 25 additions and 20 deletions
|
@ -69,7 +69,12 @@ static void SetupCliArgs(ArgsManager& argsman)
|
|||
argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-generate", strprintf("Generate blocks immediately, equivalent to RPC getnewaddress followed by RPC generatetoaddress. Optional positional integer arguments are number of blocks to generate (default: %s) and maximum iterations to try (default: %s), equivalent to RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000", DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-generate",
|
||||
strprintf("Generate blocks, equivalent to RPC getnewaddress followed by RPC generatetoaddress. Optional positional integer "
|
||||
"arguments are number of blocks to generate (default: %s) and maximum iterations to try (default: %s), equivalent to "
|
||||
"RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000",
|
||||
DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES),
|
||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the results of -getinfo is the result of multiple non-atomic requests. Some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-netinfo", "Get network peer connection information from the remote server. An optional integer argument from 0 to 4 can be passed for different peers listings (default: 0). Pass \"help\" for detailed help documentation.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
|
|
|
@ -217,9 +217,9 @@ static RPCHelpMan generatetodescriptor()
|
|||
{
|
||||
return RPCHelpMan{
|
||||
"generatetodescriptor",
|
||||
"\nMine blocks immediately to a specified descriptor (before the RPC call returns)\n",
|
||||
"Mine to a specified descriptor and return the block hashes.",
|
||||
{
|
||||
{"num_blocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated immediately."},
|
||||
{"num_blocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated."},
|
||||
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, "The descriptor to send the newly generated bitcoin to."},
|
||||
{"maxtries", RPCArg::Type::NUM, RPCArg::Default{DEFAULT_MAX_TRIES}, "How many iterations to try."},
|
||||
},
|
||||
|
@ -261,9 +261,9 @@ static RPCHelpMan generate()
|
|||
static RPCHelpMan generatetoaddress()
|
||||
{
|
||||
return RPCHelpMan{"generatetoaddress",
|
||||
"\nMine blocks immediately to a specified address (before the RPC call returns)\n",
|
||||
"Mine to a specified address and return the block hashes.",
|
||||
{
|
||||
{"nblocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated immediately."},
|
||||
{"nblocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated."},
|
||||
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The address to send the newly generated bitcoin to."},
|
||||
{"maxtries", RPCArg::Type::NUM, RPCArg::Default{DEFAULT_MAX_TRIES}, "How many iterations to try."},
|
||||
},
|
||||
|
@ -302,7 +302,7 @@ static RPCHelpMan generatetoaddress()
|
|||
static RPCHelpMan generateblock()
|
||||
{
|
||||
return RPCHelpMan{"generateblock",
|
||||
"\nMine a block with a set of ordered transactions immediately to a specified address or descriptor (before the RPC call returns)\n",
|
||||
"Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
|
||||
{
|
||||
{"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
|
||||
{"transactions", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of hex strings which are either txids or raw transactions.\n"
|
||||
|
@ -1278,9 +1278,9 @@ static const CRPCCommand commands[] =
|
|||
{ "mining", &submitheader, },
|
||||
|
||||
|
||||
{ "generating", &generatetoaddress, },
|
||||
{ "generating", &generatetodescriptor, },
|
||||
{ "generating", &generateblock, },
|
||||
{ "hidden", &generatetoaddress, },
|
||||
{ "hidden", &generatetodescriptor, },
|
||||
{ "hidden", &generateblock, },
|
||||
|
||||
{ "util", &estimatesmartfee, },
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ class HelpRpcTest(BitcoinTestFramework):
|
|||
# command titles
|
||||
titles = [line[3:-3] for line in node.help().splitlines() if line.startswith('==')]
|
||||
|
||||
components = ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util']
|
||||
components = ['Blockchain', 'Control', 'Mining', 'Network', 'Rawtransactions', 'Util']
|
||||
|
||||
if self.is_wallet_compiled():
|
||||
components.append('Wallet')
|
||||
|
|
Loading…
Reference in a new issue