Skip to content

Commit fa86a4b

Browse files
author
MarcoFalke
committed
rpc: Rename first arg of generateblock RPC to "output"
1 parent ed3b8ea commit fa86a4b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/rpc/mining.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,19 @@ static UniValue generateblock(const JSONRPCRequest& request)
277277
RPCHelpMan{"generateblock",
278278
"\nMine a block with a set of ordered transactions immediately to a specified address or descriptor (before the RPC call returns)\n",
279279
{
280-
{"address/descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
280+
{"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
281281
{"transactions", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of hex strings which are either txids or raw transactions.\n"
282282
"Txids must reference transactions currently in the mempool.\n"
283283
"All transactions must be valid and in valid order, otherwise the block will be rejected.",
284284
{
285285
{"rawtx/txid", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, ""},
286286
},
287-
}
287+
},
288288
},
289289
RPCResult{
290290
RPCResult::Type::OBJ, "", "",
291291
{
292-
{RPCResult::Type::STR_HEX, "hash", "hash of generated block"}
292+
{RPCResult::Type::STR_HEX, "hash", "hash of generated block"},
293293
}
294294
},
295295
RPCExamples{
@@ -1188,7 +1188,7 @@ static const CRPCCommand commands[] =
11881188

11891189
{ "generating", "generatetoaddress", &generatetoaddress, {"nblocks","address","maxtries"} },
11901190
{ "generating", "generatetodescriptor", &generatetodescriptor, {"num_blocks","descriptor","maxtries"} },
1191-
{ "generating", "generateblock", &generateblock, {"address","transactions"} },
1191+
{ "generating", "generateblock", &generateblock, {"output","transactions"} },
11921192

11931193
{ "util", "estimatesmartfee", &estimatesmartfee, {"conf_target", "estimate_mode"} },
11941194

test/functional/rpc_generateblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def run_test(self):
2323

2424
self.log.info('Generate an empty block to address')
2525
address = node.getnewaddress()
26-
hash = node.generateblock(address, [])['hash']
26+
hash = node.generateblock(output=address, transactions=[])['hash']
2727
block = node.getblock(hash, 2)
2828
assert_equal(len(block['tx']), 1)
2929
assert_equal(block['tx'][0]['vout'][0]['scriptPubKey']['addresses'][0], address)

0 commit comments

Comments
 (0)