aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-06-20 15:15:19 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-06-20 15:15:19 -0500
commitffab67004ca9a846d6f6d39de552e7ce79febf88 (patch)
tree958b7f632b01a22e453d103432fcfe3b62264b5d /src
parentMerge pull request #3939 (diff)
parentdon't limit miner threads in wallet (diff)
downloadmonero-ffab67004ca9a846d6f6d39de552e7ce79febf88.tar.xz
Merge pull request #3784
261ee56 don't limit miner threads in wallet (cryptochangements34)
Diffstat (limited to 'src')
-rw-r--r--src/simplewallet/simplewallet.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 5576a024f..90c3da6ca 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3807,7 +3807,6 @@ bool simple_wallet::start_mining(const std::vector<std::string>& args)
req.miner_address = m_wallet->get_account().get_public_address_str(m_wallet->nettype());
bool ok = true;
- size_t max_mining_threads_count = (std::max)(tools::get_max_concurrency(), static_cast<unsigned>(2));
size_t arg_size = args.size();
if(arg_size >= 3)
{
@@ -3823,7 +3822,7 @@ bool simple_wallet::start_mining(const std::vector<std::string>& args)
{
uint16_t num = 1;
ok = string_tools::get_xtype_from_string(num, args[0]);
- ok = ok && (1 <= num && num <= max_mining_threads_count);
+ ok = ok && 1 <= num;
req.threads_count = num;
}
else
@@ -3833,8 +3832,7 @@ bool simple_wallet::start_mining(const std::vector<std::string>& args)
if (!ok)
{
- fail_msg_writer() << tr("invalid arguments. Please use start_mining [<number_of_threads>] [do_bg_mining] [ignore_battery], "
- "<number_of_threads> should be from 1 to ") << max_mining_threads_count;
+ fail_msg_writer() << tr("invalid arguments. Please use start_mining [<number_of_threads>] [do_bg_mining] [ignore_battery]");
return true;
}