From eec5ca5535ca03e61c7ec1e0e0e41551d9dba273 Mon Sep 17 00:00:00 2001 From: XMRig Date: Thu, 21 Feb 2019 17:37:05 +0700 Subject: [PATCH 1/2] v2.13.0 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From cac240104e6d47b29ee6ffef1c48792ac5a6c7f1 Mon Sep 17 00:00:00 2001 From: XMRig Date: Thu, 21 Feb 2019 19:03:53 +0700 Subject: [PATCH 2/2] Sync changes with AMD miner. --- src/api/ApiRouter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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);