Default genproclimit to 0
This commit is contained in:
@@ -499,7 +499,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||||||
#ifdef ENABLE_MINING
|
#ifdef ENABLE_MINING
|
||||||
strUsage += HelpMessageGroup(_("Mining options:"));
|
strUsage += HelpMessageGroup(_("Mining options:"));
|
||||||
strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), 0));
|
strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), 0));
|
||||||
strUsage += HelpMessageOpt("-genproclimit=<n>", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 1));
|
strUsage += HelpMessageOpt("-genproclimit=<n>", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 0));
|
||||||
strUsage += HelpMessageOpt("-equihashsolver=<name>", _("Specify the Equihash solver to be used if enabled (default: \"default\")"));
|
strUsage += HelpMessageOpt("-equihashsolver=<name>", _("Specify the Equihash solver to be used if enabled (default: \"default\")"));
|
||||||
strUsage += HelpMessageOpt("-mineraddress=<addr>", _("Send mined coins to a specific single address"));
|
strUsage += HelpMessageOpt("-mineraddress=<addr>", _("Send mined coins to a specific single address"));
|
||||||
strUsage += HelpMessageOpt("-minetolocalwallet", strprintf(
|
strUsage += HelpMessageOpt("-minetolocalwallet", strprintf(
|
||||||
@@ -1766,9 +1766,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
// Generate coins in the background
|
// Generate coins in the background
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
if (pwalletMain || !GetArg("-mineraddress", "").empty())
|
if (pwalletMain || !GetArg("-mineraddress", "").empty())
|
||||||
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 0));
|
||||||
#else
|
#else
|
||||||
GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 0));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -319,8 +319,8 @@ UniValue setgenerate(const UniValue& params, bool fHelp)
|
|||||||
if (params.size() > 1)
|
if (params.size() > 1)
|
||||||
{
|
{
|
||||||
nGenProcLimit = params[1].get_int();
|
nGenProcLimit = params[1].get_int();
|
||||||
if (nGenProcLimit == 0)
|
//if (nGenProcLimit == 0)
|
||||||
fGenerate = false;
|
// fGenerate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mapArgs["-gen"] = (fGenerate ? "1" : "0");
|
mapArgs["-gen"] = (fGenerate ? "1" : "0");
|
||||||
|
|||||||
@@ -152,9 +152,9 @@ void AsyncRPCOperation_mergetoaddress::main()
|
|||||||
|
|
||||||
#ifdef ENABLE_MINING
|
#ifdef ENABLE_MINING
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 0));
|
||||||
#else
|
#else
|
||||||
GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 0));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -158,9 +158,9 @@ void AsyncRPCOperation_sendmany::main() {
|
|||||||
|
|
||||||
#ifdef ENABLE_MINING
|
#ifdef ENABLE_MINING
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 0));
|
||||||
#else
|
#else
|
||||||
GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 0));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -137,9 +137,9 @@ void AsyncRPCOperation_shieldcoinbase::main() {
|
|||||||
|
|
||||||
#ifdef ENABLE_MINING
|
#ifdef ENABLE_MINING
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 0));
|
||||||
#else
|
#else
|
||||||
GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 0));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void post_wallet_load(){
|
|||||||
#ifdef ENABLE_MINING
|
#ifdef ENABLE_MINING
|
||||||
// Generate coins in the background
|
// Generate coins in the background
|
||||||
if (pwalletMain || !GetArg("-mineraddress", "").empty())
|
if (pwalletMain || !GetArg("-mineraddress", "").empty())
|
||||||
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));
|
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 0));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user