MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / getgenerate

Function getgenerate

src/rpcmining.cpp:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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