This commit is contained in:
taherkaraki 2021-02-22 00:08:06 +02:00
commit fbf701d634
33 changed files with 421 additions and 68 deletions

View file

@ -1,3 +1,8 @@
# v6.9.0
- [#2104](https://github.com/xmrig/xmrig/pull/2104) Added [pause-on-active](https://xmrig.com/docs/miner/config/misc#pause-on-active) config option and `--pause-on-active=N` command line option.
- [#2112](https://github.com/xmrig/xmrig/pull/2112) Added support for [Tari merge mining](https://github.com/tari-project/tari/blob/development/README.md#tari-merge-mining).
- [#2117](https://github.com/xmrig/xmrig/pull/2117) Fixed crash when GPU mining `cn-heavy` on Zen3 system.
# v6.8.2 # v6.8.2
- [#2080](https://github.com/xmlcore/xmlcore/pull/2080) Fixed compile error in Termux. - [#2080](https://github.com/xmlcore/xmlcore/pull/2080) Fixed compile error in Termux.
- [#2089](https://github.com/xmlcore/xmlcore/pull/2089) Optimized CryptoNight-Heavy for Zen3, 7-8% speedup. - [#2089](https://github.com/xmlcore/xmlcore/pull/2089) Optimized CryptoNight-Heavy for Zen3, 7-8% speedup.

View file

@ -148,8 +148,10 @@ elseif (xmlcore_OS_APPLE)
src/App_unix.cpp src/App_unix.cpp
src/crypto/common/VirtualMemory_unix.cpp src/crypto/common/VirtualMemory_unix.cpp
) )
find_library(IOKIT_LIBRARY IOKit) find_library(IOKIT_LIBRARY IOKit)
set(EXTRA_LIBS ${IOKIT_LIBRARY}) find_library(CORESERVICES_LIBRARY CoreServices)
set(EXTRA_LIBS ${IOKIT_LIBRARY} ${CORESERVICES_LIBRARY})
else() else()
list(APPEND SOURCES_OS list(APPEND SOURCES_OS
src/App_unix.cpp src/App_unix.cpp

View file

@ -19,7 +19,7 @@ xmlcore is a high performance, open source, cross platform RandomX, KawPow, Cryp
* **[Build from source](https://xmlcore.com/docs/miner/build)** * **[Build from source](https://xmlcore.com/docs/miner/build)**
## Usage ## Usage
The preferred way to configure the miner is the [JSON config file](src/config.json) as it is more flexible and human friendly. The [command line interface](https://xmlcore.com/docs/miner/command-line-options) does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing API calls. The preferred way to configure the miner is the [JSON config file](https://xmrig.com/docs/miner/config) as it is more flexible and human friendly. The [command line interface](https://xmrig.com/docs/miner/command-line-options) does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing [API](https://xmrig.com/docs/miner/api) calls.
* **[Wizard](https://xmlcore.com/wizard)** helps you create initial configuration for the miner. * **[Wizard](https://xmlcore.com/wizard)** helps you create initial configuration for the miner.
* **[Workers](http://workers.xmlcore.info)** helps manage your miners via HTTP API. * **[Workers](http://workers.xmlcore.info)** helps manage your miners via HTTP API.

View file

@ -1,3 +1,5 @@
**:warning: Recent version of this page https://xmrig.com/docs/miner/config/cpu.**
# CPU backend # CPU backend
All CPU related settings contains in one `cpu` object in config file, CPU backend allow specify multiple profiles and allow switch between them without restrictions by pool request or config change. Default auto-configuration create reasonable minimum of profiles which cover all supported algorithms. All CPU related settings contains in one `cpu` object in config file, CPU backend allow specify multiple profiles and allow switch between them without restrictions by pool request or config change. Default auto-configuration create reasonable minimum of profiles which cover all supported algorithms.

View file

@ -83,7 +83,7 @@ xmlcore::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
{ {
# ifdef xmlcore_ALGO_CN_HEAVY # ifdef xmlcore_ALGO_CN_HEAVY
// cn-heavy optimization for Zen3 CPUs // cn-heavy optimization for Zen3 CPUs
if ((N == 1) && (m_av == CnHash::AV_SINGLE) && (m_algorithm.family() == Algorithm::CN_HEAVY) && (Cpu::info()->arch() == ICpuInfo::ARCH_ZEN3)) { if ((N == 1) && (m_av == CnHash::AV_SINGLE) && (m_algorithm.family() == Algorithm::CN_HEAVY) && (m_assembly != Assembly::NONE) && (Cpu::info()->arch() == ICpuInfo::ARCH_ZEN3)) {
std::lock_guard<std::mutex> lock(cn_heavyZen3MemoryMutex); std::lock_guard<std::mutex> lock(cn_heavyZen3MemoryMutex);
if (!cn_heavyZen3Memory) { if (!cn_heavyZen3Memory) {
cn_heavyZen3Memory = new VirtualMemory(m_algorithm.l3() * m_threads, data.hugePages, false, false, node()); cn_heavyZen3Memory = new VirtualMemory(m_algorithm.l3() * m_threads, data.hugePages, false, false, node());

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -37,7 +43,19 @@ const char *xmlcore::Tags::network()
} }
<<<<<<< HEAD
const char *xmlcore::Tags::signal() const char *xmlcore::Tags::signal()
=======
const char* xmrig::Tags::origin()
{
static const char* tag = YELLOW_BG_BOLD(WHITE_BOLD_S " origin ");
return tag;
}
const char *xmrig::Tags::signal()
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
{ {
static const char *tag = YELLOW_BG_BOLD(WHITE_BOLD_S " signal "); static const char *tag = YELLOW_BG_BOLD(WHITE_BOLD_S " signal ");

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -32,6 +38,7 @@ class Tags
public: public:
static const char *config(); static const char *config();
static const char *network(); static const char *network();
static const char *origin();
static const char *signal(); static const char *signal();
# ifdef xmlcore_MINER_PROJECT # ifdef xmlcore_MINER_PROJECT

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -46,9 +52,11 @@ public:
static void setProcessPriority(int priority); static void setProcessPriority(int priority);
static void setThreadPriority(int priority); static void setThreadPriority(int priority);
static inline const String &userAgent() { return m_userAgent; } static inline bool isUserActive(uint64_t ms) { return idleTime() < ms; }
static inline const String &userAgent() { return m_userAgent; }
static bool isOnBatteryPower(); static bool isOnBatteryPower();
static uint64_t idleTime();
private: private:
static char *createUserAgent(); static char *createUserAgent();

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -107,3 +113,18 @@ bool xmlcore::Platform::isOnBatteryPower()
{ {
return IOPSGetTimeRemainingEstimate() != kIOPSTimeRemainingUnlimited; return IOPSGetTimeRemainingEstimate() != kIOPSTimeRemainingUnlimited;
} }
uint64_t xmrig::Platform::idleTime()
{
uint64_t idle_time = 0;
const auto service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOHIDSystem"));
const auto property = IORegistryEntryCreateCFProperty(service, CFSTR("HIDIdleTime"), kCFAllocatorDefault, 0);
CFNumberGetValue((CFNumberRef)property, kCFNumberSInt64Type, &idle_time);
CFRelease(property);
IOObjectRelease(service);
return idle_time / 1000000U;
}

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -34,6 +40,7 @@
#include <uv.h> #include <uv.h>
#include <thread> #include <thread>
#include <fstream> #include <fstream>
#include <limits>
#include "base/kernel/Platform.h" #include "base/kernel/Platform.h"
@ -158,3 +165,9 @@ bool xmlcore::Platform::isOnBatteryPower()
} }
return false; return false;
} }
uint64_t xmrig::Platform::idleTime()
{
return std::numeric_limits<uint64_t>::max();
}

View file

@ -1,6 +1,12 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright (c) 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -21,6 +27,7 @@
#include <winsock2.h> #include <winsock2.h>
#include <windows.h> #include <windows.h>
#include <uv.h> #include <uv.h>
#include <limits>
#include "base/kernel/Platform.h" #include "base/kernel/Platform.h"
@ -161,3 +168,16 @@ bool xmlcore::Platform::isOnBatteryPower()
} }
return false; return false;
} }
uint64_t xmrig::Platform::idleTime()
{
LASTINPUTINFO info{};
info.cbSize = sizeof(LASTINPUTINFO);
if (!GetLastInputInfo(&info)) {
return std::numeric_limits<uint64_t>::max();
}
return static_cast<uint64_t>(GetTickCount() - info.dwTime);
}

View file

@ -1,12 +1,6 @@
/* xmlcore /* XMRig
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -61,7 +55,6 @@ const char *BaseConfig::kColors = "colors";
const char *BaseConfig::kDryRun = "dry-run"; const char *BaseConfig::kDryRun = "dry-run";
const char *BaseConfig::kHttp = "http"; const char *BaseConfig::kHttp = "http";
const char *BaseConfig::kLogFile = "log-file"; const char *BaseConfig::kLogFile = "log-file";
const char *BaseConfig::kPauseOnBattery = "pause-on-battery";
const char *BaseConfig::kPrintTime = "print-time"; const char *BaseConfig::kPrintTime = "print-time";
const char *BaseConfig::kSyslog = "syslog"; const char *BaseConfig::kSyslog = "syslog";
const char *BaseConfig::kTitle = "title"; const char *BaseConfig::kTitle = "title";
@ -91,7 +84,6 @@ bool xmlcore::BaseConfig::read(const IJsonReader &reader, const char *fileName)
m_dryRun = reader.getBool(kDryRun, m_dryRun); m_dryRun = reader.getBool(kDryRun, m_dryRun);
m_syslog = reader.getBool(kSyslog, m_syslog); m_syslog = reader.getBool(kSyslog, m_syslog);
m_watch = reader.getBool(kWatch, m_watch); m_watch = reader.getBool(kWatch, m_watch);
m_pauseOnBattery = reader.getBool(kPauseOnBattery, m_pauseOnBattery);
m_logFile = reader.getString(kLogFile); m_logFile = reader.getString(kLogFile);
m_userAgent = reader.getString(kUserAgent); m_userAgent = reader.getString(kUserAgent);
m_printTime = std::min(reader.getUint(kPrintTime, m_printTime), 3600U); m_printTime = std::min(reader.getUint(kPrintTime, m_printTime), 3600U);

View file

@ -1,12 +1,6 @@
/* xmlcore /* XMRig
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -55,7 +49,6 @@ public:
static const char *kDryRun; static const char *kDryRun;
static const char *kHttp; static const char *kHttp;
static const char *kLogFile; static const char *kLogFile;
static const char *kPauseOnBattery;
static const char *kPrintTime; static const char *kPrintTime;
static const char *kSyslog; static const char *kSyslog;
static const char *kTitle; static const char *kTitle;
@ -72,7 +65,6 @@ public:
inline bool isAutoSave() const { return m_autoSave; } inline bool isAutoSave() const { return m_autoSave; }
inline bool isBackground() const { return m_background; } inline bool isBackground() const { return m_background; }
inline bool isDryRun() const { return m_dryRun; } inline bool isDryRun() const { return m_dryRun; }
inline bool isPauseOnBattery() const { return m_pauseOnBattery; }
inline bool isSyslog() const { return m_syslog; } inline bool isSyslog() const { return m_syslog; }
inline const char *logFile() const { return m_logFile.data(); } inline const char *logFile() const { return m_logFile.data(); }
inline const char *userAgent() const { return m_userAgent.data(); } inline const char *userAgent() const { return m_userAgent.data(); }
@ -100,7 +92,6 @@ protected:
bool m_autoSave = true; bool m_autoSave = true;
bool m_background = false; bool m_background = false;
bool m_dryRun = false; bool m_dryRun = false;
bool m_pauseOnBattery = false;
bool m_syslog = false; bool m_syslog = false;
bool m_upgrade = false; bool m_upgrade = false;
bool m_watch = true; bool m_watch = true;
@ -112,7 +103,7 @@ protected:
String m_logFile; String m_logFile;
String m_userAgent; String m_userAgent;
Title m_title; Title m_title;
uint32_t m_printTime = 60; uint32_t m_printTime = 60;
# ifdef xmlcore_FEATURE_TLS # ifdef xmlcore_FEATURE_TLS
TlsConfig m_tls; TlsConfig m_tls;

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -260,8 +266,8 @@ void xmlcore::BaseTransform::transform(rapidjson::Document &doc, int key, const
case IConfig::DryRunKey: /* --dry-run */ case IConfig::DryRunKey: /* --dry-run */
case IConfig::HttpEnabledKey: /* --http-enabled */ case IConfig::HttpEnabledKey: /* --http-enabled */
case IConfig::DaemonKey: /* --daemon */ case IConfig::DaemonKey: /* --daemon */
case IConfig::SubmitToOriginKey: /* --submit-to-origin */
case IConfig::VerboseKey: /* --verbose */ case IConfig::VerboseKey: /* --verbose */
case IConfig::PauseOnBatteryKey: /* --pause-on-battery */
return transformBoolean(doc, key, true); return transformBoolean(doc, key, true);
case IConfig::ColorKey: /* --no-color */ case IConfig::ColorKey: /* --no-color */
@ -290,7 +296,13 @@ void xmlcore::BaseTransform::transformBoolean(rapidjson::Document &doc, int key,
case IConfig::TlsKey: /* --tls */ case IConfig::TlsKey: /* --tls */
return add(doc, Pools::kPools, Pool::kTls, enable); return add(doc, Pools::kPools, Pool::kTls, enable);
<<<<<<< HEAD
# ifdef xmlcore_FEATURE_HTTP # ifdef xmlcore_FEATURE_HTTP
=======
case IConfig::SubmitToOriginKey: /* --submit-to-origin */
return add(doc, Pools::kPools, Pool::kSubmitToOrigin, enable);
# ifdef XMRIG_FEATURE_HTTP
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
case IConfig::DaemonKey: /* --daemon */ case IConfig::DaemonKey: /* --daemon */
return add(doc, Pools::kPools, Pool::kDaemon, enable); return add(doc, Pools::kPools, Pool::kDaemon, enable);
# endif # endif
@ -320,9 +332,6 @@ void xmlcore::BaseTransform::transformBoolean(rapidjson::Document &doc, int key,
case IConfig::NoTitleKey: /* --no-title */ case IConfig::NoTitleKey: /* --no-title */
return set(doc, BaseConfig::kTitle, enable); return set(doc, BaseConfig::kTitle, enable);
case IConfig::PauseOnBatteryKey: /* --pause-on-battery */
return set(doc, BaseConfig::kPauseOnBattery, enable);
default: default:
break; break;
} }

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -86,6 +92,8 @@ public:
BenchTokenKey = 1048, BenchTokenKey = 1048,
DmiKey = 1049, DmiKey = 1049,
HugePageSizeKey = 1050, HugePageSizeKey = 1050,
PauseOnActiveKey = 1051,
SubmitToOriginKey = 1052,
// xmlcore common // xmlcore common
CPUPriorityKey = 1021, CPUPriorityKey = 1021,

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -8,6 +9,12 @@
* Copyright 2019 Howard Chu <https://github.com/hyc> * Copyright 2019 Howard Chu <https://github.com/hyc>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2019 Howard Chu <https://github.com/hyc>
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -80,6 +87,7 @@ const char *Pool::kPass = "pass";
const char *Pool::kRigId = "rig-id"; const char *Pool::kRigId = "rig-id";
const char *Pool::kSelfSelect = "self-select"; const char *Pool::kSelfSelect = "self-select";
const char *Pool::kSOCKS5 = "socks5"; const char *Pool::kSOCKS5 = "socks5";
const char *Pool::kSubmitToOrigin = "submit-to-origin";
const char *Pool::kTls = "tls"; const char *Pool::kTls = "tls";
const char *Pool::kUrl = "url"; const char *Pool::kUrl = "url";
const char *Pool::kUser = "user"; const char *Pool::kUser = "user";
@ -137,7 +145,8 @@ xmlcore::Pool::Pool(const rapidjson::Value &object) :
setKeepAlive(Json::getValue(object, kKeepalive)); setKeepAlive(Json::getValue(object, kKeepalive));
if (m_daemon.isValid()) { if (m_daemon.isValid()) {
m_mode = MODE_SELF_SELECT; m_mode = MODE_SELF_SELECT;
m_submitToOrigin = Json::getBool(object, kSubmitToOrigin, m_submitToOrigin);
} }
else if (Json::getBool(object, kDaemon)) { else if (Json::getBool(object, kDaemon)) {
m_mode = MODE_DAEMON; m_mode = MODE_DAEMON;
@ -237,7 +246,7 @@ xmlcore::IClient *xmlcore::Pool::createClient(int id, IClientListener *listener)
client = new DaemonClient(id, listener); client = new DaemonClient(id, listener);
} }
else if (m_mode == MODE_SELF_SELECT) { else if (m_mode == MODE_SELF_SELECT) {
client = new SelfSelectClient(id, Platform::userAgent(), listener); client = new SelfSelectClient(id, Platform::userAgent(), listener, m_submitToOrigin);
} }
# endif # endif
# ifdef xmlcore_ALGO_KAWPOW # ifdef xmlcore_ALGO_KAWPOW
@ -300,7 +309,8 @@ rapidjson::Value xmlcore::Pool::toJSON(rapidjson::Document &doc) const
obj.AddMember(StringRef(kDaemonPollInterval), m_pollInterval, allocator); obj.AddMember(StringRef(kDaemonPollInterval), m_pollInterval, allocator);
} }
else { else {
obj.AddMember(StringRef(kSelfSelect), m_daemon.url().toJSON(), allocator); obj.AddMember(StringRef(kSelfSelect), m_daemon.url().toJSON(), allocator);
obj.AddMember(StringRef(kSubmitToOrigin), m_submitToOrigin, allocator);
} }
return obj; return obj;
@ -319,7 +329,7 @@ std::string xmlcore::Pool::printableName() const
} }
if (m_mode == MODE_SELF_SELECT) { if (m_mode == MODE_SELF_SELECT) {
out += std::string(" self-select ") + CSI "1;" + std::to_string(m_daemon.isTLS() ? 32 : 36) + "m" + m_daemon.url().data() + CLEAR; out += std::string(" self-select ") + CSI "1;" + std::to_string(m_daemon.isTLS() ? 32 : 36) + "m" + m_daemon.url().data() + WHITE_BOLD_S + (m_submitToOrigin ? " submit-to-origin" : "") + CLEAR;
} }
return out; return out;

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -8,6 +9,12 @@
* Copyright 2019 Howard Chu <https://github.com/hyc> * Copyright 2019 Howard Chu <https://github.com/hyc>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2019 Howard Chu <https://github.com/hyc>
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -73,6 +80,7 @@ public:
static const char *kRigId; static const char *kRigId;
static const char *kSelfSelect; static const char *kSelfSelect;
static const char *kSOCKS5; static const char *kSOCKS5;
static const char *kSubmitToOrigin;
static const char *kTls; static const char *kTls;
static const char *kUrl; static const char *kUrl;
static const char *kUser; static const char *kUser;
@ -144,6 +152,7 @@ private:
void setKeepAlive(const rapidjson::Value &value); void setKeepAlive(const rapidjson::Value &value);
Algorithm m_algorithm; Algorithm m_algorithm;
bool m_submitToOrigin = false;
Coin m_coin; Coin m_coin;
int m_keepAlive = 0; int m_keepAlive = 0;
Mode m_mode = MODE_POOL; Mode m_mode = MODE_POOL;

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -8,6 +9,13 @@
* Copyright 2019 jtgrassie <https://github.com/jtgrassie> * Copyright 2019 jtgrassie <https://github.com/jtgrassie>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2019 jtgrassie <https://github.com/jtgrassie>
* Copyright (c) 2021 Hansie Odendaal <https://github.com/hansieodendaal>
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -31,9 +39,12 @@
#include "base/io/json/Json.h" #include "base/io/json/Json.h"
#include "base/io/json/JsonRequest.h" #include "base/io/json/JsonRequest.h"
#include "base/io/log/Log.h" #include "base/io/log/Log.h"
#include "base/io/log/Tags.h"
#include "base/net/http/Fetch.h" #include "base/net/http/Fetch.h"
#include "base/net/http/HttpData.h" #include "base/net/http/HttpData.h"
#include "base/net/stratum/Client.h" #include "base/net/stratum/Client.h"
#include "net/JobResult.h"
#include "base/tools/Cvt.h"
namespace xmlcore { namespace xmlcore {
@ -54,7 +65,12 @@ static const char * const required_fields[] = { kBlocktemplateBlob, kBlockhashin
} /* namespace xmlcore */ } /* namespace xmlcore */
<<<<<<< HEAD
xmlcore::SelfSelectClient::SelfSelectClient(int id, const char *agent, IClientListener *listener) : xmlcore::SelfSelectClient::SelfSelectClient(int id, const char *agent, IClientListener *listener) :
=======
xmrig::SelfSelectClient::SelfSelectClient(int id, const char *agent, IClientListener *listener, bool submitToOrigin) :
m_submitToOrigin(submitToOrigin),
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
m_listener(listener) m_listener(listener)
{ {
m_httpListener = std::make_shared<HttpListener>(this); m_httpListener = std::make_shared<HttpListener>(this);
@ -68,7 +84,21 @@ xmlcore::SelfSelectClient::~SelfSelectClient()
} }
<<<<<<< HEAD
void xmlcore::SelfSelectClient::tick(uint64_t now) void xmlcore::SelfSelectClient::tick(uint64_t now)
=======
int64_t xmrig::SelfSelectClient::submit(const JobResult &result)
{
if (m_submitToOrigin) {
submitOriginDaemon(result);
}
return m_client->submit(result);
}
void xmrig::SelfSelectClient::tick(uint64_t now)
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
{ {
m_client->tick(now); m_client->tick(now);
@ -201,6 +231,9 @@ void xmlcore::SelfSelectClient::submitBlockTemplate(rapidjson::Value &result)
Document doc(kObjectType); Document doc(kObjectType);
auto &allocator = doc.GetAllocator(); auto &allocator = doc.GetAllocator();
m_blocktemplate = Json::getString(result,kBlocktemplateBlob);
m_blockDiff = Json::getUint64(result, kDifficulty);
Value params(kObjectType); Value params(kObjectType);
params.AddMember(StringRef(kId), m_job.clientId().toJSON(), allocator); params.AddMember(StringRef(kId), m_job.clientId().toJSON(), allocator);
params.AddMember(StringRef(kJobId), m_job.id().toJSON(), allocator); params.AddMember(StringRef(kJobId), m_job.id().toJSON(), allocator);
@ -236,7 +269,49 @@ void xmlcore::SelfSelectClient::submitBlockTemplate(rapidjson::Value &result)
} }
<<<<<<< HEAD
void xmlcore::SelfSelectClient::onHttpData(const HttpData &data) void xmlcore::SelfSelectClient::onHttpData(const HttpData &data)
=======
void xmrig::SelfSelectClient::submitOriginDaemon(const JobResult& result)
{
if (result.diff == 0 || m_blockDiff == 0) {
return;
}
if (result.actualDiff() < m_blockDiff) {
m_originNotSubmitted++;
LOG_DEBUG("%s " RED_BOLD("not submitted to origin daemon, difficulty too low") " (%" PRId64 "/%" PRId64 ") "
BLACK_BOLD(" diff ") BLACK_BOLD("%" PRIu64) BLACK_BOLD(" vs. ") BLACK_BOLD("%" PRIu64),
Tags::origin(), m_originSubmitted, m_originNotSubmitted, m_blockDiff, result.actualDiff());
return;
}
char *data = m_blocktemplate.data();
Cvt::toHex(data + 78, 8, reinterpret_cast<const uint8_t*>(&result.nonce), 4);
using namespace rapidjson;
Document doc(kObjectType);
Value params(kArrayType);
params.PushBack(m_blocktemplate.toJSON(), doc.GetAllocator());
JsonRequest::create(doc, m_sequence, "submitblock", params);
m_results[m_sequence] = SubmitResult(m_sequence, result.diff, result.actualDiff(), 0, result.backend);
FetchRequest req(HTTP_POST, pool().daemon().host(), pool().daemon().port(), "/json_rpc", doc, pool().daemon().isTLS(), isQuiet());
fetch(tag(), std::move(req), m_httpListener);
m_originSubmitted++;
LOG_INFO("%s " GREEN_BOLD("submitted to origin daemon") " (%" PRId64 "/%" PRId64 ") "
" diff " WHITE("%" PRIu64) " vs. " WHITE("%" PRIu64),
Tags::origin(), m_originSubmitted, m_originNotSubmitted, m_blockDiff, result.actualDiff(), result.diff);
// Ensure that the latest block template is available after block submission
getBlockTemplate();
}
void xmrig::SelfSelectClient::onHttpData(const HttpData &data)
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
{ {
if (data.status != HTTP_STATUS_OK) { if (data.status != HTTP_STATUS_OK) {
return retry(); return retry();

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -8,6 +9,13 @@
* Copyright 2019 jtgrassie <https://github.com/jtgrassie> * Copyright 2019 jtgrassie <https://github.com/jtgrassie>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2019 jtgrassie <https://github.com/jtgrassie>
* Copyright (c) 2021 Hansie Odendaal <https://github.com/hansieodendaal>
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -31,9 +39,9 @@
#include "base/kernel/interfaces/IClientListener.h" #include "base/kernel/interfaces/IClientListener.h"
#include "base/net/http/HttpListener.h" #include "base/net/http/HttpListener.h"
#include "base/net/stratum/Job.h" #include "base/net/stratum/Job.h"
#include "base/tools/Object.h"
#include <map>
#include <memory> #include <memory>
@ -45,7 +53,7 @@ class SelfSelectClient : public IClient, public IClientListener, public IHttpLis
public: public:
xmlcore_DISABLE_COPY_MOVE_DEFAULT(SelfSelectClient) xmlcore_DISABLE_COPY_MOVE_DEFAULT(SelfSelectClient)
SelfSelectClient(int id, const char *agent, IClientListener *listener); SelfSelectClient(int id, const char *agent, IClientListener *listener, bool submitToOrigin);
~SelfSelectClient() override; ~SelfSelectClient() override;
protected: protected:
@ -65,7 +73,6 @@ protected:
inline int64_t send(const rapidjson::Value &obj, Callback callback) override { return m_client->send(obj, callback); } inline int64_t send(const rapidjson::Value &obj, Callback callback) override { return m_client->send(obj, callback); }
inline int64_t send(const rapidjson::Value &obj) override { return m_client->send(obj); } inline int64_t send(const rapidjson::Value &obj) override { return m_client->send(obj); }
inline int64_t sequence() const override { return m_client->sequence(); } inline int64_t sequence() const override { return m_client->sequence(); }
inline int64_t submit(const JobResult &result) override { return m_client->submit(result); }
inline void connect() override { m_client->connect(); } inline void connect() override { m_client->connect(); }
inline void connect(const Pool &pool) override { m_client->connect(pool); } inline void connect(const Pool &pool) override { m_client->connect(pool); }
inline void deleteLater() override { m_client->deleteLater(); } inline void deleteLater() override { m_client->deleteLater(); }
@ -77,6 +84,7 @@ protected:
inline void setRetries(int retries) override { m_client->setRetries(retries); m_retries = retries; } inline void setRetries(int retries) override { m_client->setRetries(retries); m_retries = retries; }
inline void setRetryPause(uint64_t ms) override { m_client->setRetryPause(ms); m_retryPause = ms; } inline void setRetryPause(uint64_t ms) override { m_client->setRetryPause(ms); m_retryPause = ms; }
int64_t submit(const JobResult &result) override;
void tick(uint64_t now) override; void tick(uint64_t now) override;
// IClientListener // IClientListener
@ -105,19 +113,26 @@ private:
void retry(); void retry();
void setState(State state); void setState(State state);
void submitBlockTemplate(rapidjson::Value &result); void submitBlockTemplate(rapidjson::Value &result);
void submitOriginDaemon(const JobResult &result);
bool m_active = false; bool m_active = false;
bool m_quiet = false; bool m_quiet = false;
const bool m_submitToOrigin;
IClient *m_client; IClient *m_client;
IClientListener *m_listener; IClientListener *m_listener;
int m_retries = 5; int m_retries = 5;
int64_t m_failures = 0; int64_t m_failures = 0;
int64_t m_sequence = 1; int64_t m_sequence = 1;
Job m_job; Job m_job;
State m_state = IdleState; State m_state = IdleState;
std::map<int64_t, SubmitResult> m_results;
std::shared_ptr<IHttpListener> m_httpListener; std::shared_ptr<IHttpListener> m_httpListener;
uint64_t m_retryPause = 5000; String m_blocktemplate;
uint64_t m_timestamp = 0; uint64_t m_blockDiff = 0;
uint64_t m_originNotSubmitted = 0;
uint64_t m_originSubmitted = 0;
uint64_t m_retryPause = 5000;
uint64_t m_timestamp = 0;
}; };

View file

@ -75,7 +75,8 @@
"tls-fingerprint": null, "tls-fingerprint": null,
"daemon": false, "daemon": false,
"socks5": null, "socks5": null,
"self-select": null "self-select": null,
"submit-to-origin": false
} }
], ],
"print-time": 60, "print-time": 60,
@ -96,5 +97,6 @@
"user-agent": null, "user-agent": null,
"verbose": 0, "verbose": 0,
"watch": true, "watch": true,
"pause-on-battery": false "pause-on-battery": false,
"pause-on-active": false
} }

View file

@ -352,6 +352,7 @@ public:
Algorithms algorithms; Algorithms algorithms;
bool active = false; bool active = false;
bool battery_power = false; bool battery_power = false;
bool user_active = false;
bool enabled = true; bool enabled = true;
bool reset = true; bool reset = true;
Controller *controller; Controller *controller;
@ -600,7 +601,8 @@ void xmlcore::Miner::onConfigChanged(Config *config, Config *previousConfig)
void xmlcore::Miner::onTimer(const Timer *) void xmlcore::Miner::onTimer(const Timer *)
{ {
double maxHashrate = 0.0; double maxHashrate = 0.0;
const auto healthPrintTime = d_ptr->controller->config()->healthPrintTime(); const auto config = d_ptr->controller->config();
const auto healthPrintTime = config->healthPrintTime();
bool stopMiner = false; bool stopMiner = false;
@ -620,25 +622,29 @@ void xmlcore::Miner::onTimer(const Timer *)
d_ptr->maxHashrate[d_ptr->algorithm] = std::max(d_ptr->maxHashrate[d_ptr->algorithm], maxHashrate); d_ptr->maxHashrate[d_ptr->algorithm] = std::max(d_ptr->maxHashrate[d_ptr->algorithm], maxHashrate);
const auto printTime = d_ptr->controller->config()->printTime(); const auto printTime = config->printTime();
if (printTime && d_ptr->ticks && (d_ptr->ticks % (printTime * 2)) == 0) { if (printTime && d_ptr->ticks && (d_ptr->ticks % (printTime * 2)) == 0) {
d_ptr->printHashrate(false); d_ptr->printHashrate(false);
} }
d_ptr->ticks++; d_ptr->ticks++;
if (d_ptr->controller->config()->isPauseOnBattery()) { auto autoPause = [this](bool &state, bool pause, const char *pauseMessage, const char *activeMessage)
const bool battery_power = Platform::isOnBatteryPower(); {
if (battery_power && d_ptr->enabled) { if ((pause && !state) || (!pause && state)) {
LOG_INFO("%s " YELLOW_BOLD("on battery power"), Tags::miner()); LOG_INFO("%s %s", Tags::miner(), pause ? pauseMessage : activeMessage);
d_ptr->battery_power = true;
setEnabled(false); state = pause;
} setEnabled(!pause);
else if (!battery_power && !d_ptr->enabled && d_ptr->battery_power) {
LOG_INFO("%s " GREEN_BOLD("on AC power"), Tags::miner());
d_ptr->battery_power = false;
setEnabled(true);
} }
};
if (config->isPauseOnBattery()) {
autoPause(d_ptr->battery_power, Platform::isOnBatteryPower(), YELLOW_BOLD("on battery power"), GREEN_BOLD("on AC power"));
}
if (config->isPauseOnActive()) {
autoPause(d_ptr->user_active, Platform::isUserActive(config->idleTime()), YELLOW_BOLD("user active"), GREEN_BOLD("user inactive"));
} }
if (stopMiner) { if (stopMiner) {

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,6 +28,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <algorithm> #include <algorithm>
#include <cinttypes> #include <cinttypes>
#include <cstring> #include <cstring>
@ -54,7 +61,18 @@
namespace xmlcore { namespace xmlcore {
<<<<<<< HEAD
#ifdef xmlcore_FEATURE_OPENCL #ifdef xmlcore_FEATURE_OPENCL
=======
constexpr static uint32_t kIdleTime = 60U;
const char *Config::kPauseOnBattery = "pause-on-battery";
const char *Config::kPauseOnActive = "pause-on-active";
#ifdef XMRIG_FEATURE_OPENCL
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
const char *Config::kOcl = "opencl"; const char *Config::kOcl = "opencl";
#endif #endif
@ -74,7 +92,9 @@ const char *Config::kDMI = "dmi";
class ConfigPrivate class ConfigPrivate
{ {
public: public:
bool pauseOnBattery = false;
CpuConfig cpu; CpuConfig cpu;
uint32_t idleTime = 0;
# ifdef xmlcore_ALGO_RANDOMX # ifdef xmlcore_ALGO_RANDOMX
RxConfig rx; RxConfig rx;
@ -88,13 +108,28 @@ public:
CudaConfig cuda; CudaConfig cuda;
# endif # endif
<<<<<<< HEAD
# if defined(xmlcore_FEATURE_NVML) || defined (xmlcore_FEATURE_ADL) # if defined(xmlcore_FEATURE_NVML) || defined (xmlcore_FEATURE_ADL)
uint32_t healthPrintTime = 60; uint32_t healthPrintTime = 60;
=======
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
uint32_t healthPrintTime = 60U;
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
# endif # endif
# ifdef xmlcore_FEATURE_DMI # ifdef xmlcore_FEATURE_DMI
bool dmi = true; bool dmi = true;
# endif # endif
void setIdleTime(const rapidjson::Value &value)
{
if (value.IsBool()) {
idleTime = value.GetBool() ? kIdleTime : 0U;
}
else if (value.IsUint()) {
idleTime = value.GetUint();
}
}
}; };
} }
@ -112,14 +147,35 @@ xmlcore::Config::~Config()
} }
<<<<<<< HEAD
const xmlcore::CpuConfig &xmlcore::Config::cpu() const const xmlcore::CpuConfig &xmlcore::Config::cpu() const
=======
bool xmrig::Config::isPauseOnBattery() const
{
return d_ptr->pauseOnBattery;
}
const xmrig::CpuConfig &xmrig::Config::cpu() const
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
{ {
return d_ptr->cpu; return d_ptr->cpu;
} }
<<<<<<< HEAD
#ifdef xmlcore_FEATURE_OPENCL #ifdef xmlcore_FEATURE_OPENCL
const xmlcore::OclConfig &xmlcore::Config::cl() const const xmlcore::OclConfig &xmlcore::Config::cl() const
=======
uint32_t xmrig::Config::idleTime() const
{
return d_ptr->idleTime * 1000U;
}
#ifdef XMRIG_FEATURE_OPENCL
const xmrig::OclConfig &xmrig::Config::cl() const
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
{ {
return d_ptr->cl; return d_ptr->cl;
} }
@ -186,6 +242,9 @@ bool xmlcore::Config::read(const IJsonReader &reader, const char *fileName)
return false; return false;
} }
d_ptr->pauseOnBattery = reader.getBool(kPauseOnBattery, d_ptr->pauseOnBattery);
d_ptr->setIdleTime(reader.getValue(kPauseOnActive));
d_ptr->cpu.read(reader.getValue(CpuConfig::kField)); d_ptr->cpu.read(reader.getValue(CpuConfig::kField));
# ifdef xmlcore_ALGO_RANDOMX # ifdef xmlcore_ALGO_RANDOMX
@ -270,4 +329,5 @@ void xmlcore::Config::getJSON(rapidjson::Document &doc) const
doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator); doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator);
doc.AddMember(StringRef(kWatch), m_watch, allocator); doc.AddMember(StringRef(kWatch), m_watch, allocator);
doc.AddMember(StringRef(kPauseOnBattery), isPauseOnBattery(), allocator); doc.AddMember(StringRef(kPauseOnBattery), isPauseOnBattery(), allocator);
doc.AddMember(StringRef(kPauseOnActive), (d_ptr->idleTime == 0U || d_ptr->idleTime == kIdleTime) ? Value(isPauseOnActive()) : Value(d_ptr->idleTime), allocator);
} }

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -50,7 +56,14 @@ class Config : public BaseConfig
public: public:
xmlcore_DISABLE_COPY_MOVE(Config); xmlcore_DISABLE_COPY_MOVE(Config);
<<<<<<< HEAD
# ifdef xmlcore_FEATURE_OPENCL # ifdef xmlcore_FEATURE_OPENCL
=======
static const char *kPauseOnBattery;
static const char *kPauseOnActive;
# ifdef XMRIG_FEATURE_OPENCL
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
static const char *kOcl; static const char *kOcl;
# endif # endif
@ -69,7 +82,11 @@ public:
Config(); Config();
~Config() override; ~Config() override;
inline bool isPauseOnActive() const { return idleTime() > 0; }
bool isPauseOnBattery() const;
const CpuConfig &cpu() const; const CpuConfig &cpu() const;
uint32_t idleTime() const;
# ifdef xmlcore_FEATURE_OPENCL # ifdef xmlcore_FEATURE_OPENCL
const OclConfig &cl() const; const OclConfig &cl() const;

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -150,7 +156,17 @@ void xmlcore::ConfigTransform::transform(rapidjson::Document &doc, int key, cons
case IConfig::YieldKey: /* --cpu-no-yield */ case IConfig::YieldKey: /* --cpu-no-yield */
return set(doc, CpuConfig::kField, CpuConfig::kYield, false); return set(doc, CpuConfig::kField, CpuConfig::kYield, false);
<<<<<<< HEAD
# ifdef xmlcore_ALGO_ARGON2 # ifdef xmlcore_ALGO_ARGON2
=======
case IConfig::PauseOnBatteryKey: /* --pause-on-battery */
return set(doc, Config::kPauseOnBattery, true);
case IConfig::PauseOnActiveKey: /* --pause-on-active */
return set(doc, Config::kPauseOnActive, static_cast<uint64_t>(strtol(arg, nullptr, 10)));
# ifdef XMRIG_ALGO_ARGON2
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
case IConfig::Argon2ImplKey: /* --argon2-impl */ case IConfig::Argon2ImplKey: /* --argon2-impl */
return set(doc, CpuConfig::kField, CpuConfig::kArgon2Impl, arg); return set(doc, CpuConfig::kField, CpuConfig::kArgon2Impl, arg);
# endif # endif

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2021 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -105,7 +105,8 @@ R"===(
"tls-fingerprint": null, "tls-fingerprint": null,
"daemon": false, "daemon": false,
"socks5": null, "socks5": null,
"self-select": null "self-select": null,
"submit-to-origin": false
} }
], ],
"print-time": 60, "print-time": 60,
@ -126,7 +127,8 @@ R"===(
"user-agent": null, "user-agent": null,
"verbose": 0, "verbose": 0,
"watch": true, "watch": true,
"pause-on-battery": false "pause-on-battery": false,
"pause-on-active": false
} }
)==="; )===";
#endif #endif

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,11 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -57,6 +63,7 @@ static const option options[] = {
{ "daemon", 0, nullptr, IConfig::DaemonKey }, { "daemon", 0, nullptr, IConfig::DaemonKey },
{ "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey }, { "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey },
{ "self-select", 1, nullptr, IConfig::SelfSelectKey }, { "self-select", 1, nullptr, IConfig::SelfSelectKey },
{ "submit-to-origin", 0, nullptr, IConfig::SubmitToOriginKey },
# endif # endif
{ "av", 1, nullptr, IConfig::AVKey }, { "av", 1, nullptr, IConfig::AVKey },
{ "background", 0, nullptr, IConfig::BackgroundKey }, { "background", 0, nullptr, IConfig::BackgroundKey },
@ -98,7 +105,12 @@ static const option options[] = {
{ "title", 1, nullptr, IConfig::TitleKey }, { "title", 1, nullptr, IConfig::TitleKey },
{ "no-title", 0, nullptr, IConfig::NoTitleKey }, { "no-title", 0, nullptr, IConfig::NoTitleKey },
{ "pause-on-battery", 0, nullptr, IConfig::PauseOnBatteryKey }, { "pause-on-battery", 0, nullptr, IConfig::PauseOnBatteryKey },
<<<<<<< HEAD
# ifdef xmlcore_FEATURE_BENCHMARK # ifdef xmlcore_FEATURE_BENCHMARK
=======
{ "pause-on-active", 1, nullptr, IConfig::PauseOnActiveKey },
# ifdef XMRIG_FEATURE_BENCHMARK
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
{ "stress", 0, nullptr, IConfig::StressKey }, { "stress", 0, nullptr, IConfig::StressKey },
{ "bench", 1, nullptr, IConfig::BenchKey }, { "bench", 1, nullptr, IConfig::BenchKey },
{ "benchmark", 1, nullptr, IConfig::BenchKey }, { "benchmark", 1, nullptr, IConfig::BenchKey },

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
/* xmlcore /* xmlcore
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2012-2014 pooler <pooler@litecoinpool.org>
@ -7,6 +8,16 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com> * Copyright 2016-2020 xmlcore <https://github.com/xmlcore>, <support@xmlcore.com>
=======
/* XMRig
* Copyright (c) 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright (c) 2012-2014 pooler <pooler@litecoinpool.org>
* Copyright (c) 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright (c) 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright (c) 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -64,6 +75,7 @@ static inline const std::string &usage()
u += " --daemon use daemon RPC instead of pool for solo mining\n"; u += " --daemon use daemon RPC instead of pool for solo mining\n";
u += " --daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)\n"; u += " --daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)\n";
u += " --self-select=URL self-select block templates from URL\n"; u += " --self-select=URL self-select block templates from URL\n";
u += " --submit-to-origin also submit solution back to self-select URL\n";
# endif # endif
u += " -r, --retries=N number of times to retry before switch to backup server (default: 5)\n"; u += " -r, --retries=N number of times to retry before switch to backup server (default: 5)\n";
@ -181,6 +193,7 @@ static inline const std::string &usage()
u += " --no-title disable setting console window title\n"; u += " --no-title disable setting console window title\n";
# endif # endif
u += " --pause-on-battery pause mine on battery power\n"; u += " --pause-on-battery pause mine on battery power\n";
u += " --pause-on-active=N pause mine when the user is active (resume after N seconds of last activity)\n";
# ifdef xmlcore_FEATURE_BENCHMARK # ifdef xmlcore_FEATURE_BENCHMARK
u += " --stress run continuous stress test to check system stability\n"; u += " --stress run continuous stress test to check system stability\n";

View file

@ -300,7 +300,11 @@ xmlcore::cn_hash_fun xmlcore::CnHash::fn(const Algorithm &algorithm, AlgoVariant
# ifdef xmlcore_ALGO_CN_HEAVY # ifdef xmlcore_ALGO_CN_HEAVY
// cn-heavy optimization for Zen3 CPUs // cn-heavy optimization for Zen3 CPUs
<<<<<<< HEAD
if ((av == AV_SINGLE) && (xmlcore::Cpu::info()->arch() == xmlcore::ICpuInfo::ARCH_ZEN3)) { if ((av == AV_SINGLE) && (xmlcore::Cpu::info()->arch() == xmlcore::ICpuInfo::ARCH_ZEN3)) {
=======
if ((av == AV_SINGLE) && (assembly != Assembly::NONE) && (Cpu::info()->arch() == ICpuInfo::ARCH_ZEN3)) {
>>>>>>> 072881e1a1214befdd46f5823f4ba7afeb14136a
switch (algorithm.id()) { switch (algorithm.id()) {
case xmlcore::Algorithm::CN_HEAVY_0: case xmlcore::Algorithm::CN_HEAVY_0:
return cryptonight_single_hash<xmlcore::Algorithm::CN_HEAVY_0, false, 3>; return cryptonight_single_hash<xmlcore::Algorithm::CN_HEAVY_0, false, 3>;

View file

@ -27,8 +27,6 @@ if (WITH_DMI)
list(APPEND SOURCES src/hw/dmi/DmiReader_unix.cpp) list(APPEND SOURCES src/hw/dmi/DmiReader_unix.cpp)
elseif(xmlcore_OS_MACOS) elseif(xmlcore_OS_MACOS)
list(APPEND SOURCES src/hw/dmi/DmiReader_mac.cpp) list(APPEND SOURCES src/hw/dmi/DmiReader_mac.cpp)
find_library(CORESERVICES_LIBRARY CoreServices)
list(APPEND EXTRA_LIBS ${CORESERVICES_LIBRARY})
endif() endif()
else() else()
remove_definitions(/Dxmlcore_FEATURE_DMI) remove_definitions(/Dxmlcore_FEATURE_DMI)

View file

@ -35,8 +35,8 @@
#define APP_KIND "xcore" #define APP_KIND "xcore"
#define APP_VER_MAJOR 6 #define APP_VER_MAJOR 6
#define APP_VER_MINOR 8 #define APP_VER_MINOR 9
#define APP_VER_PATCH 2 #define APP_VER_PATCH 0
#ifdef _MSC_VER #ifdef _MSC_VER
# if (_MSC_VER >= 1920) # if (_MSC_VER >= 1920)