mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 07:55:04 -05:00
Backport fixes from v4.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
# v3.1.3
|
||||||
|
- [#1180](https://github.com/xmrig/xmrig/issues/1180) Fixed possible duplicated shares after algorithm switching.
|
||||||
|
- Fixed wrong config file permissions after write (only gcc builds on recent Windows 10 affected).
|
||||||
|
|
||||||
# v3.1.2
|
# v3.1.2
|
||||||
- Many RandomX optimizations and fixes.
|
- Many RandomX optimizations and fixes.
|
||||||
- [#1132](https://github.com/xmrig/xmrig/issues/1132) Fixed build on CentOS 7.
|
- [#1132](https://github.com/xmrig/xmrig/issues/1132) Fixed build on CentOS 7.
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
|
# include <sys/stat.h>
|
||||||
# include <ext/stdio_filebuf.h>
|
# include <ext/stdio_filebuf.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@ bool xmrig::Json::save(const char *fileName, const rapidjson::Document &doc)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
# elif defined(__GNUC__)
|
# elif defined(__GNUC__)
|
||||||
const int fd = _wopen(toUtf16(fileName).c_str(), _O_WRONLY | _O_BINARY | _O_CREAT | _O_TRUNC);
|
const int fd = _wopen(toUtf16(fileName).c_str(), _O_WRONLY | _O_BINARY | _O_CREAT | _O_TRUNC, _S_IWRITE);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,16 +112,15 @@ public:
|
|||||||
{
|
{
|
||||||
active = true;
|
active = true;
|
||||||
|
|
||||||
|
if (reset) {
|
||||||
|
Nonce::reset(job.index());
|
||||||
|
}
|
||||||
|
|
||||||
for (IBackend *backend : backends) {
|
for (IBackend *backend : backends) {
|
||||||
backend->setJob(job);
|
backend->setJob(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reset) {
|
Nonce::touch();
|
||||||
Nonce::reset(job.index());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Nonce::touch();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
Nonce::pause(false);;
|
Nonce::pause(false);;
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ void xmrig::Nonce::reset(uint8_t index)
|
|||||||
std::lock_guard<std::mutex> lock(mutex);
|
std::lock_guard<std::mutex> lock(mutex);
|
||||||
|
|
||||||
m_nonces[index] = 0;
|
m_nonces[index] = 0;
|
||||||
touch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user