diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:16:08 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:16:08 +0200 |
| commit | d2059dfab297c01f0edf35dfb07acf5ebc42543e (patch) | |
| tree | 6f965649b1efbe48b20df08beb47fb9d29878177 /src/daemon/command_parser_executor.cpp | |
| parent | d596722dfa68e9ba073a22735df1b097b4a38969 (diff) | |
| parent | 69ab14d91e67fdf242b00c83ab85ce280e55f6f4 (diff) | |
| download | monzero-core-d2059dfab297c01f0edf35dfb07acf5ebc42543e.tar.gz monzero-core-d2059dfab297c01f0edf35dfb07acf5ebc42543e.tar.xz monzero-core-d2059dfab297c01f0edf35dfb07acf5ebc42543e.zip | |
Merge pull request #1737
69ab14d9 More robust battery status handling. (Dion Ahmetaj)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
| -rw-r--r-- | src/daemon/command_parser_executor.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 8ed529737..e5fa5fece 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -272,12 +272,18 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg std::cout << "Mining to a testnet address, make sure this is intentional!" << std::endl; uint64_t threads_count = 1; bool do_background_mining = false; - if(args.size() > 3) + bool ignore_battery = false; + if(args.size() > 4) { return false; } - if(args.size() == 3) + if(args.size() == 4) + { + ignore_battery = args[3] == "true"; + } + + if(args.size() >= 3) { do_background_mining = args[2] == "true"; } @@ -288,7 +294,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg threads_count = (ok && 0 < threads_count) ? threads_count : 1; } - m_executor.start_mining(adr, threads_count, testnet, do_background_mining); + m_executor.start_mining(adr, threads_count, testnet, do_background_mining, ignore_battery); return true; } |
