Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | static bool getScriptFromDescriptor(const std::string &descriptor, | ||||
return false; | return false; | ||||
} | } | ||||
static UniValue generatetodescriptor(const Config &config, | static UniValue generatetodescriptor(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"generatetodescriptor", | "generatetodescriptor", | ||||
"\nMine blocks immediately to a specified descriptor (before the RPC " | "Mine blocks immediately to a specified descriptor (before the RPC " | ||||
"call returns)\n", | "call returns)\n", | ||||
{ | { | ||||
{"num_blocks", RPCArg::Type::NUM, RPCArg::Optional::NO, | {"num_blocks", RPCArg::Type::NUM, RPCArg::Optional::NO, | ||||
"How many blocks are generated immediately."}, | "How many blocks are generated immediately."}, | ||||
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, | {"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"The descriptor to send the newly generated bitcoin to."}, | "The descriptor to send the newly generated bitcoin to."}, | ||||
{"maxtries", RPCArg::Type::NUM, | {"maxtries", RPCArg::Type::NUM, | ||||
/* default */ ToString(DEFAULT_MAX_TRIES), | /* default */ ToString(DEFAULT_MAX_TRIES), | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | static UniValue generatetoaddress(const Config &config, | ||||
return generateBlocks(config, chainman, mempool, coinbase_script, | return generateBlocks(config, chainman, mempool, coinbase_script, | ||||
num_blocks, max_tries); | num_blocks, max_tries); | ||||
} | } | ||||
static UniValue generateblock(const Config &config, | static UniValue generateblock(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"generateblock", | "generateblock", | ||||
"\nMine a block with a set of ordered transactions immediately to a " | "Mine a block with a set of ordered transactions immediately to a " | ||||
"specified address or descriptor (before the RPC call returns)\n", | "specified address or descriptor (before the RPC call returns)\n", | ||||
{ | { | ||||
{"output", RPCArg::Type::STR, RPCArg::Optional::NO, | {"output", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"The address or descriptor to send the newly generated bitcoin " | "The address or descriptor to send the newly generated bitcoin " | ||||
"to."}, | "to."}, | ||||
{ | { | ||||
"transactions", | "transactions", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
▲ Show 20 Lines • Show All 828 Lines • Show Last 20 Lines |