Merged v4.3.0-beta

This commit is contained in:
MoneroOcean 2019-10-10 14:52:12 -07:00
commit fe76800fc8
101 changed files with 10318 additions and 7615 deletions

View file

@ -23,9 +23,9 @@
*/
#include <algorithm>
#include <string.h>
#include <cstring>
#include <uv.h>
#include <inttypes.h>
#include <cinttypes>
#include "backend/cpu/Cpu.h"
@ -50,8 +50,7 @@
namespace xmrig {
static const char *kCPU = "cpu";
static constexpr const uint32_t kVersion = 1;
static const char *kCPU = "cpu";
#ifdef XMRIG_ALGO_RANDOMX
static const char *kRandomX = "randomx";
@ -79,7 +78,7 @@ public:
}
xmrig::Config::Config() : BaseConfig(),
xmrig::Config::Config() :
d_ptr(new ConfigPrivate())
{
}
@ -119,10 +118,6 @@ bool xmrig::Config::isShouldSave() const
return false;
}
if (version() < kVersion) {
return true;
}
# ifdef XMRIG_FEATURE_OPENCL
if (cl().isShouldSave()) {
return true;
@ -139,7 +134,7 @@ bool xmrig::Config::read(const IJsonReader &reader, const char *fileName)
return false;
}
d_ptr->cpu.read(reader.getValue(kCPU), version());
d_ptr->cpu.read(reader.getValue(kCPU));
m_benchmark.read(reader.getValue("algo-perf"));
# ifdef XMRIG_ALGO_RANDOMX
@ -171,7 +166,6 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
doc.AddMember("api", api, allocator);
doc.AddMember("http", m_http.toJSON(doc), allocator);
doc.AddMember("autosave", isAutoSave(), allocator);
doc.AddMember("version", kVersion, allocator);
doc.AddMember("background", isBackground(), allocator);
doc.AddMember("colors", Log::colors, allocator);