mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 18:11:05 +00:00
Merge branch 'dev' into feature-opencl
This commit is contained in:
commit
ce3e2401cb
4 changed files with 25 additions and 5 deletions
|
@ -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`.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue