Merge branch 'dev' into feature-opencl

This commit is contained in:
XMRig 2019-08-31 09:36:58 +07:00
commit ce3e2401cb
4 changed files with 25 additions and 5 deletions

View file

@ -5,6 +5,8 @@
- [#1142](https://github.com/xmrig/xmrig/pull/1142) RandomX hashrate improved by 0.5-1.5% depending on variant and CPU.
- [#1146](https://github.com/xmrig/xmrig/pull/1146) Fixed race condition in RandomX thread init.
- [#1148](https://github.com/xmrig/xmrig/pull/1148) Fixed, on Linux linker marking entire executable as having an executable stack.
- Fixed, for Argon2 algorithms command line options like `--threads` was ignored.
- Fixed command line options for single pool, free order allowed again.
# v3.1.0
- [#1107](https://github.com/xmrig/xmrig/issues/1107#issuecomment-522235892) Added Argon2 algorithm family: `argon2/chukwa` and `argon2/wrkz`.

View file

@ -33,11 +33,12 @@
#endif
#include "base/kernel/config/BaseTransform.h"
#include "base/kernel/Process.h"
#include "base/io/log/Log.h"
#include "base/kernel/interfaces/IConfig.h"
#include "base/io/json/JsonChain.h"
#include "base/io/log/Log.h"
#include "base/kernel/config/BaseTransform.h"
#include "base/kernel/interfaces/IConfig.h"
#include "base/kernel/Process.h"
#include "base/net/stratum/Pool.h"
#include "core/config/Config_platform.h"
@ -138,7 +139,19 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
break;
case IConfig::UrlKey: /* --url */
return add(doc, kPools, "url", arg, true);
{
if (!doc.HasMember(kPools)) {
doc.AddMember(rapidjson::StringRef(kPools), rapidjson::kArrayType, doc.GetAllocator());
}
rapidjson::Value &array = doc[kPools];
if (array.Size() == 0 || Pool(array[array.Size() - 1]).isValid()) {
array.PushBack(rapidjson::kObjectType, doc.GetAllocator());
}
set(doc, array[array.Size() - 1], "url", arg);
break;
}
case IConfig::UserKey: /* --user */
return add(doc, kPools, "user", arg);

View file

@ -200,6 +200,9 @@ bool xmrig::Pool::isEqual(const Pool &other) const
bool xmrig::Pool::parse(const char *url)
{
assert(url != nullptr);
if (url == nullptr) {
return false;
}
const char *p = strstr(url, "://");
const char *base = url;

View file

@ -96,6 +96,8 @@ void xmrig::ConfigTransform::finalize(rapidjson::Document &doc)
BaseTransform::finalize(doc);
if (m_threads) {
doc.AddMember("version", 1, allocator);
if (!doc.HasMember(kCpu)) {
doc.AddMember(StringRef(kCpu), Value(kObjectType), allocator);
}