aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorDion Ahmetaj <Dion Ahmetaj>2017-02-08 16:17:50 -0500
committerDion Ahmetaj <Dion Ahmetaj>2017-02-10 18:07:43 -0500
commitad95e65028302c151546e49698284fdf48727c6d (patch)
tree5f543e906da88c41936ae279c63e96ebb5909435 /src/rpc
parentChanged ac_line_status to on_battery_power. (diff)
downloadmonero-ad95e65028302c151546e49698284fdf48727c6d.tar.xz
Added a note about smart mining to status command. Fixed up a bug where I was resetting bg mining enabled instead of started. Upped the miner threshold. Also moved setting of enabled on start above miner thread creation since starting with true, then stopping, then starting with false resulted in race condition.
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp1
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 608f1e531..1caf737ca 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -663,6 +663,7 @@ namespace cryptonote
const miner& lMiner = m_core.get_miner();
res.active = lMiner.is_mining();
+ res.is_background_mining_enabled = lMiner.get_is_background_mining_enabled();
if ( lMiner.is_mining() ) {
res.speed = lMiner.get_speed();
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index a26350ba9..3ab1ea175 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -610,6 +610,7 @@ namespace cryptonote
uint64_t speed;
uint32_t threads_count;
std::string address;
+ bool is_background_mining_enabled;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
@@ -617,6 +618,7 @@ namespace cryptonote
KV_SERIALIZE(speed)
KV_SERIALIZE(threads_count)
KV_SERIALIZE(address)
+ KV_SERIALIZE(is_background_mining_enabled)
END_KV_SERIALIZE_MAP()
};
};