Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 2 || | ||||
"The address to send the newly generated bitcoin to."}, | "The address to send the newly generated bitcoin to."}, | ||||
{"maxtries", RPCArg::Type::NUM, /* opt */ true, | {"maxtries", RPCArg::Type::NUM, /* opt */ true, | ||||
/* default_val */ "1000000", "How many iterations to try."}, | /* default_val */ "1000000", "How many iterations to try."}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"[ blockhashes ] (array) hashes of blocks generated\n"}, | "[ blockhashes ] (array) hashes of blocks generated\n"}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nGenerate 11 blocks to myaddress\n" + | "\nGenerate 11 blocks to myaddress\n" + | ||||
HelpExampleCli("generatetoaddress", "11 \"myaddress\"")}, | HelpExampleCli("generatetoaddress", "11 \"myaddress\"") + | ||||
"If you are running the bitcoin core wallet, you can get a new " | |||||
"address to send the newly generated bitcoin to with:\n" + | |||||
HelpExampleCli("getnewaddress", "")}, | |||||
} | } | ||||
.ToString()); | .ToString()); | ||||
} | } | ||||
int nGenerate = request.params[0].get_int(); | int nGenerate = request.params[0].get_int(); | ||||
uint64_t nMaxTries = 1000000; | uint64_t nMaxTries = 1000000; | ||||
if (!request.params[2].isNull()) { | if (!request.params[2].isNull()) { | ||||
nMaxTries = request.params[2].get_int(); | nMaxTries = request.params[2].get_int(); | ||||
▲ Show 20 Lines • Show All 678 Lines • Show Last 20 Lines |