mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-23 14:52:52 -05:00
Return current algorithm in API response.
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
|
||||
|
||||
xmrig::Network::Network(Controller *controller) :
|
||||
m_controller(controller),
|
||||
m_donate(nullptr),
|
||||
m_timer(nullptr)
|
||||
{
|
||||
@@ -230,6 +231,9 @@ void xmrig::Network::getConnection(rapidjson::Value &reply, rapidjson::Document
|
||||
using namespace rapidjson;
|
||||
auto &allocator = doc.GetAllocator();
|
||||
|
||||
const Algorithm &algo = m_strategy->client()->job().algorithm();
|
||||
reply.AddMember("algo", StringRef((algo.isValid() ? algo : m_controller->config()->algorithm()).shortName()), allocator);
|
||||
|
||||
Value connection(kObjectType);
|
||||
connection.AddMember("pool", StringRef(m_state.pool), allocator);
|
||||
connection.AddMember("uptime", m_state.connectionTime(), allocator);
|
||||
|
||||
Reference in New Issue
Block a user