From 88031650b48f5a71514e01b0c26878b9492726db Mon Sep 17 00:00:00 2001 From: xmrig Date: Sat, 7 Mar 2020 15:24:55 +0700 Subject: [PATCH 1/4] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 2110d28050..48d4228f68 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # XMRig -**:warning: [Monero changed PoW algorithm to RandomX on November 30.](https://github.com/xmrig/xmrig/issues/1204)** - [![Github All Releases](https://img.shields.io/github/downloads/xmrig/xmrig/total.svg)](https://github.com/xmrig/xmrig/releases) [![GitHub release](https://img.shields.io/github/release/xmrig/xmrig/all.svg)](https://github.com/xmrig/xmrig/releases) [![GitHub Release Date](https://img.shields.io/github/release-date-pre/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/releases) @@ -9,7 +7,7 @@ [![GitHub stars](https://img.shields.io/github/stars/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/stargazers) [![GitHub forks](https://img.shields.io/github/forks/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/network) -XMRig High performance, open source, cross platform RandomX, CryptoNight and Argon2 CPU/GPU miner, with official support for Windows. +XMRig High performance, open source, cross platform RandomX, CryptoNight, AstroBWT and Argon2 CPU/GPU miner, with official support for Windows. ## Mining backends - **CPU** (x64/x86/ARM) From e8355e1a1ca7b239d3015ea98f204a0adcb374f6 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 8 Mar 2020 02:43:16 +0700 Subject: [PATCH 2/4] Sync changes with proxy. --- src/base/io/log/FileLogWriter.cpp | 41 +++++++++++++++++++++++++++---- src/base/io/log/FileLogWriter.h | 1 + 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/base/io/log/FileLogWriter.cpp b/src/base/io/log/FileLogWriter.cpp index 3386929a79..8ae31273c0 100644 --- a/src/base/io/log/FileLogWriter.cpp +++ b/src/base/io/log/FileLogWriter.cpp @@ -25,6 +25,24 @@ #include +namespace xmrig { + + +static void fsWriteCallback(uv_fs_t *req) +{ + delete [] static_cast(req->data); + + uv_fs_req_cleanup(req); + delete req; +} + + +static const char *kNewLine = "\n"; + + +} // namespace xmrig + + bool xmrig::FileLogWriter::open(const char *fileName) { assert(fileName != nullptr); @@ -52,12 +70,25 @@ bool xmrig::FileLogWriter::write(const char *data, size_t size) auto req = new uv_fs_t; req->data = buf.base; - uv_fs_write(uv_default_loop(), req, m_file, &buf, 1, -1, [](uv_fs_t *req) { - delete [] static_cast(req->data); + uv_fs_write(uv_default_loop(), req, m_file, &buf, 1, -1, fsWriteCallback); + + return true; +} + + +bool xmrig::FileLogWriter::writeLine(const char *data, size_t size) +{ + uv_buf_t buf[2] = { + uv_buf_init(new char[size], size), + uv_buf_init(const_cast(kNewLine), 1) + }; + + memcpy(buf[0].base, data, size); + + auto req = new uv_fs_t; + req->data = buf[0].base; - uv_fs_req_cleanup(req); - delete req; - }); + uv_fs_write(uv_default_loop(), req, m_file, buf, 2, -1, fsWriteCallback); return true; } diff --git a/src/base/io/log/FileLogWriter.h b/src/base/io/log/FileLogWriter.h index f451f2b866..5dca4c58c5 100644 --- a/src/base/io/log/FileLogWriter.h +++ b/src/base/io/log/FileLogWriter.h @@ -36,6 +36,7 @@ class FileLogWriter bool open(const char *fileName); bool write(const char *data, size_t size); + bool writeLine(const char *data, size_t size); private: int m_file = -1; From f1e688724e5dc035469382670df6eee6407cf048 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 8 Mar 2020 12:29:32 +0700 Subject: [PATCH 3/4] #1585 Fixed build without HTTP support. --- CHANGELOG.md | 1 + src/base/base.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e21b0e06..949e60c146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # v5.9.0 - [#1578](https://github.com/xmrig/xmrig/pull/1578) Added new RandomKEVA algorithm for upcoming Kevacoin fork, as `"algo": "rx/keva"` or `"coin": "keva"`. - [#1584](https://github.com/xmrig/xmrig/pull/1584) Fixed invalid AstroBWT hashes after algorithm switching. +- [#1585](https://github.com/xmrig/xmrig/issues/1585) Fixed build without HTTP support. - Added command line option `--astrobwt-max-size`. # v5.8.2 diff --git a/src/base/base.cmake b/src/base/base.cmake index b576226515..871b045d4b 100644 --- a/src/base/base.cmake +++ b/src/base/base.cmake @@ -34,7 +34,6 @@ set(HEADERS_BASE src/base/kernel/Signals.h src/base/net/dns/Dns.h src/base/net/dns/DnsRecord.h - src/base/net/http/Fetch.h src/base/net/http/Http.h src/base/net/http/HttpListener.h src/base/net/stratum/BaseClient.h @@ -81,10 +80,7 @@ set(SOURCES_BASE src/base/kernel/Signals.cpp src/base/net/dns/Dns.cpp src/base/net/dns/DnsRecord.cpp - src/base/net/http/Fetch.cpp src/base/net/http/Http.cpp - src/base/net/http/HttpData.cpp - src/base/net/http/HttpListener.cpp src/base/net/stratum/BaseClient.cpp src/base/net/stratum/Client.cpp src/base/net/stratum/Job.cpp @@ -148,6 +144,7 @@ if (WITH_HTTP) src/base/kernel/interfaces/IHttpListener.h src/base/kernel/interfaces/IJsonReader.h src/base/kernel/interfaces/ITcpServerListener.h + src/base/net/http/Fetch.h src/base/net/http/HttpApiResponse.h src/base/net/http/HttpClient.h src/base/net/http/HttpContext.h @@ -165,9 +162,12 @@ if (WITH_HTTP) src/base/api/Httpd.cpp src/base/api/requests/ApiRequest.cpp src/base/api/requests/HttpApiRequest.cpp + src/base/net/http/Fetch.cpp src/base/net/http/HttpApiResponse.cpp src/base/net/http/HttpClient.cpp src/base/net/http/HttpContext.cpp + src/base/net/http/HttpData.cpp + src/base/net/http/HttpListener.cpp src/base/net/http/HttpResponse.cpp src/base/net/http/HttpServer.cpp src/base/net/stratum/DaemonClient.cpp From f1b8351a6347084263ebb1dd1d86d38d942f5397 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 8 Mar 2020 13:09:51 +0700 Subject: [PATCH 4/4] v5.9.0 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index dd1be965d1..a770cc86c4 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 miner" -#define APP_VERSION "5.9.0-dev" +#define APP_VERSION "5.9.0" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com"