aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/rpc_command_executor.cpp
diff options
context:
space:
mode:
authorDion Ahmetaj <Dion Ahmetaj>2017-02-15 14:00:01 -0500
committerDion Ahmetaj <Dion Ahmetaj>2017-02-16 14:35:01 -0500
commit69ab14d91e67fdf242b00c83ab85ce280e55f6f4 (patch)
tree2f6ebdf501907f94f5cbd1f23adcbf65fad2de83 /src/daemon/rpc_command_executor.cpp
parentMerge pull request #1719 (diff)
downloadmonero-69ab14d91e67fdf242b00c83ab85ce280e55f6f4.tar.xz
More robust battery status handling.
Added an extra path to check for linux power supply status. Added ignore battery option. If set to true, then when we can't figure out the power status, we'll assume the system is plugged in.
Diffstat (limited to 'src/daemon/rpc_command_executor.cpp')
-rw-r--r--src/daemon/rpc_command_executor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 00b349b15..219a7a1c4 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -929,13 +929,14 @@ bool t_rpc_command_executor::print_transaction_pool_stats() {
return true;
}
-bool t_rpc_command_executor::start_mining(cryptonote::account_public_address address, uint64_t num_threads, bool testnet, bool do_background_mining = false) {
+bool t_rpc_command_executor::start_mining(cryptonote::account_public_address address, uint64_t num_threads, bool testnet, bool do_background_mining, bool ignore_battery) {
cryptonote::COMMAND_RPC_START_MINING::request req;
cryptonote::COMMAND_RPC_START_MINING::response res;
req.miner_address = cryptonote::get_account_address_as_str(testnet, address);
req.threads_count = num_threads;
req.do_background_mining = do_background_mining;
-
+ req.ignore_battery = ignore_battery;
+
std::string fail_message = "Mining did not start";
if (m_is_rpc)