diff --git a/src/api/ApiRouter.cpp b/src/api/ApiRouter.cpp index 69fa1594..bdedac4d 100644 --- a/src/api/ApiRouter.cpp +++ b/src/api/ApiRouter.cpp @@ -293,13 +293,16 @@ void ApiRouter::getThreads(rapidjson::Document &doc) const const std::vector &threads = m_controller->config()->threads(); rapidjson::Value list(rapidjson::kArrayType); + size_t i = 0; for (const xmrig::IThread *thread : threads) { rapidjson::Value value = thread->toAPI(doc); rapidjson::Value hashrate(rapidjson::kArrayType); - hashrate.PushBack(normalize(hr->calc(thread->index(), Hashrate::ShortInterval)), allocator); - hashrate.PushBack(normalize(hr->calc(thread->index(), Hashrate::MediumInterval)), allocator); - hashrate.PushBack(normalize(hr->calc(thread->index(), Hashrate::LargeInterval)), allocator); + hashrate.PushBack(normalize(hr->calc(i, Hashrate::ShortInterval)), allocator); + hashrate.PushBack(normalize(hr->calc(i, Hashrate::MediumInterval)), allocator); + hashrate.PushBack(normalize(hr->calc(i, Hashrate::LargeInterval)), allocator); + + i++; value.AddMember("hashrate", hashrate, allocator); list.PushBack(value, allocator); diff --git a/src/version.h b/src/version.h index 0ad8edaa..36185bf6 100644 --- a/src/version.h +++ b/src/version.h @@ -28,7 +28,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig CPU miner" -#define APP_VERSION "2.13.0-dev" +#define APP_VERSION "2.13.0" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2019 xmrig.com"