MCPcopy Create free account
hub / github.com/LUX-Core/lux / getgenerate

Function getgenerate

src/rpcmining.cpp:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104#ifdef ENABLE_WALLET
105UniValue getgenerate(const UniValue& params, bool fHelp)
106{
107 if (fHelp || params.size() != 0)
108 throw runtime_error(
109 "getgenerate\n"
110 "\nReturn if the server is set to generate coins or not. The default is false.\n"
111 "It is set with the command line argument -gen (or lux.conf setting gen)\n"
112 "It can also be set with the setgenerate call.\n"
113 "\nResult\n"
114 "true|false (boolean) If the server is set to generate coins or not\n"
115 "\nExamples:\n" +
116 HelpExampleCli("getgenerate", "") + HelpExampleRpc("getgenerate", ""));
117
118 LOCK(cs_main);
119
120 return GetBoolArg("-gen", false);
121}
122
123
124UniValue setgenerate(const UniValue& params, bool fHelp)

Callers 1

getmininginfoFunction · 0.85

Calls 4

HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85
GetBoolArgFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected