| 103 | |
| 104 | #ifdef ENABLE_WALLET |
| 105 | UniValue 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 | |
| 124 | UniValue setgenerate(const UniValue& params, bool fHelp) |
no test coverage detected