| 95 | |
| 96 | #ifdef ENABLE_WALLET |
| 97 | UniValue 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 | |
| 116 | UniValue generate(const UniValue& params, bool fHelp) |
| 117 | { |
no test coverage detected