From 94f9918f9d085bfdabbcdf1ce60af1115894d096 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 30 Jun 2018 01:18:10 -1100 Subject: [PATCH] Default genproclimit to 0 --- src/init.cpp | 6 +++--- src/rpcmining.cpp | 4 ++-- src/wallet/asyncrpcoperation_mergetoaddress.cpp | 4 ++-- src/wallet/asyncrpcoperation_sendmany.cpp | 4 ++-- src/wallet/asyncrpcoperation_shieldcoinbase.cpp | 4 ++-- src/zcbenchmarks.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 52c919421..1b8018b56 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -499,7 +499,7 @@ std::string HelpMessage(HelpMessageMode mode) #ifdef ENABLE_MINING strUsage += HelpMessageGroup(_("Mining options:")); strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), 0)); - strUsage += HelpMessageOpt("-genproclimit=", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 1)); + strUsage += HelpMessageOpt("-genproclimit=", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 0)); strUsage += HelpMessageOpt("-equihashsolver=", _("Specify the Equihash solver to be used if enabled (default: \"default\")")); strUsage += HelpMessageOpt("-mineraddress=", _("Send mined coins to a specific single address")); strUsage += HelpMessageOpt("-minetolocalwallet", strprintf( @@ -1766,9 +1766,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // Generate coins in the background #ifdef ENABLE_WALLET if (pwalletMain || !GetArg("-mineraddress", "").empty()) - GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 0)); #else - GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 0)); #endif #endif diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 7f66f23f6..afe4e5a33 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -319,8 +319,8 @@ UniValue setgenerate(const UniValue& params, bool fHelp) if (params.size() > 1) { nGenProcLimit = params[1].get_int(); - if (nGenProcLimit == 0) - fGenerate = false; + //if (nGenProcLimit == 0) + // fGenerate = false; } mapArgs["-gen"] = (fGenerate ? "1" : "0"); diff --git a/src/wallet/asyncrpcoperation_mergetoaddress.cpp b/src/wallet/asyncrpcoperation_mergetoaddress.cpp index a85f3315c..fa41c87d4 100644 --- a/src/wallet/asyncrpcoperation_mergetoaddress.cpp +++ b/src/wallet/asyncrpcoperation_mergetoaddress.cpp @@ -152,9 +152,9 @@ void AsyncRPCOperation_mergetoaddress::main() #ifdef ENABLE_MINING #ifdef ENABLE_WALLET - GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 0)); #else - GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", 0)); #endif #endif diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 6f33b514e..3652f7d0d 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -158,9 +158,9 @@ void AsyncRPCOperation_sendmany::main() { #ifdef ENABLE_MINING #ifdef ENABLE_WALLET - GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 0)); #else - GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 0)); #endif #endif diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp index 1bc82fdbe..f48cf8dcd 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp @@ -137,9 +137,9 @@ void AsyncRPCOperation_shieldcoinbase::main() { #ifdef ENABLE_MINING #ifdef ENABLE_WALLET - GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 0)); #else - GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 0)); #endif #endif diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 2c7e99a67..b3fbddf88 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -61,7 +61,7 @@ void post_wallet_load(){ #ifdef ENABLE_MINING // Generate coins in the background if (pwalletMain || !GetArg("-mineraddress", "").empty()) - GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1)); + GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 0)); #endif }