Added x3 x4 x5 hashing modes.

This commit is contained in:
XMRig 2018-04-16 15:40:37 +07:00
parent dba1acd302
commit 9e3f2ae9f9
6 changed files with 442 additions and 20 deletions

View file

@ -298,13 +298,17 @@ void ApiRouter::getResults(rapidjson::Document &doc) const
void ApiRouter::getThreads(rapidjson::Document &doc) const
{
doc.SetArray();
doc.SetObject();
auto &allocator = doc.GetAllocator();
const std::vector<xmrig::IThread *> &threads = m_controller->config()->threads();
rapidjson::Value list(rapidjson::kArrayType);
for (const xmrig::IThread *thread : threads) {
doc.PushBack(thread->toAPI(doc), doc.GetAllocator());
list.PushBack(thread->toAPI(doc), allocator);
}
doc.AddMember("threads", list, allocator);
}