Skip to content

Commit fa3bb58

Browse files
author
MarcoFalke
committed
doc: Rework generate* doc
Can be reviewed with --word-diff-regex=. --ignore-all-space
1 parent 66636ca commit fa3bb58

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/rpc/mining.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ static RPCHelpMan generatetodescriptor()
217217
{
218218
return RPCHelpMan{
219219
"generatetodescriptor",
220-
"\nMine blocks immediately to a specified descriptor (before the RPC call returns)\n",
220+
"Mine to a specified descriptor and return the block hashes.",
221221
{
222-
{"num_blocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated immediately."},
222+
{"num_blocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated."},
223223
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, "The descriptor to send the newly generated bitcoin to."},
224224
{"maxtries", RPCArg::Type::NUM, RPCArg::Default{DEFAULT_MAX_TRIES}, "How many iterations to try."},
225225
},
@@ -261,18 +261,18 @@ static RPCHelpMan generate()
261261
static RPCHelpMan generatetoaddress()
262262
{
263263
return RPCHelpMan{"generatetoaddress",
264-
"\nMine blocks immediately to a specified address (before the RPC call returns)\n",
265-
{
266-
{"nblocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated immediately."},
267-
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The address to send the newly generated bitcoin to."},
268-
{"maxtries", RPCArg::Type::NUM, RPCArg::Default{DEFAULT_MAX_TRIES}, "How many iterations to try."},
269-
},
270-
RPCResult{
271-
RPCResult::Type::ARR, "", "hashes of blocks generated",
272-
{
273-
{RPCResult::Type::STR_HEX, "", "blockhash"},
274-
}},
275-
RPCExamples{
264+
"Mine to a specified address and return the block hashes.",
265+
{
266+
{"nblocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated."},
267+
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The address to send the newly generated bitcoin to."},
268+
{"maxtries", RPCArg::Type::NUM, RPCArg::Default{DEFAULT_MAX_TRIES}, "How many iterations to try."},
269+
},
270+
RPCResult{
271+
RPCResult::Type::ARR, "", "hashes of blocks generated",
272+
{
273+
{RPCResult::Type::STR_HEX, "", "blockhash"},
274+
}},
275+
RPCExamples{
276276
"\nGenerate 11 blocks to myaddress\n"
277277
+ HelpExampleCli("generatetoaddress", "11 \"myaddress\"")
278278
+ "If you are using the " PACKAGE_NAME " wallet, you can get a new address to send the newly generated bitcoin to with:\n"
@@ -302,7 +302,7 @@ static RPCHelpMan generatetoaddress()
302302
static RPCHelpMan generateblock()
303303
{
304304
return RPCHelpMan{"generateblock",
305-
"\nMine a block with a set of ordered transactions immediately to a specified address or descriptor (before the RPC call returns)\n",
305+
"Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
306306
{
307307
{"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
308308
{"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[] =
12781278
{ "mining", &submitheader, },
12791279

12801280

1281-
{ "generating", &generatetoaddress, },
1282-
{ "generating", &generatetodescriptor, },
1283-
{ "generating", &generateblock, },
1281+
{ "hidden", &generatetoaddress, },
1282+
{ "hidden", &generatetodescriptor, },
1283+
{ "hidden", &generateblock, },
12841284

12851285
{ "util", &estimatesmartfee, },
12861286

test/functional/rpc_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_categories(self):
100100
# command titles
101101
titles = [line[3:-3] for line in node.help().splitlines() if line.startswith('==')]
102102

103-
components = ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util']
103+
components = ['Blockchain', 'Control', 'Mining', 'Network', 'Rawtransactions', 'Util']
104104

105105
if self.is_wallet_compiled():
106106
components.append('Wallet')

0 commit comments

Comments
 (0)