diff --git a/CMakeLists.txt b/CMakeLists.txt index 8823b078..03fcd6d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ include (cmake/cpu.cmake) set(HEADERS + + src/3rdparty/align.h src/api/Api.h src/api/ApiState.h src/api/NetworkState.h diff --git a/README.md b/README.md index 5494dc0b..002cafd6 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Originally based on cpuminer-multi with heavy optimizations/rewrites and removin * This software is like the [CPU-mining](https://github.com/xmrig/xmrig) version; but there is also a [NVIDIA GPU version](https://github.com/xmrig/xmrig-nvidia) and [AMD GPU version]( https://github.com/xmrig/xmrig-amd). * This is the **CPU-mining** version, there is also a [NVIDIA GPU version](https://github.com/xmrig/xmrig-nvidia) and [AMD GPU version]( https://github.com/xmrig/xmrig-amd). +* You can use [config.xmrig.com](https://config.xmrig.com/) to generate/edit/share your configurations. :new: ## Own features @@ -22,4 +23,4 @@ Originally based on cpuminer-multi with heavy optimizations/rewrites and removin * xmrig@enwillyado.com * [telegram](https://telegram.me/enWILLYado) -¡Se habla español! +¡Se habla español! diff --git a/res/app.ico b/res/app.ico index 7ab97bae..86353b83 100644 Binary files a/res/app.ico and b/res/app.ico differ diff --git a/src/Mem_unix.cpp b/src/Mem_unix.cpp index d0e892ff..846c427d 100644 --- a/src/Mem_unix.cpp +++ b/src/Mem_unix.cpp @@ -99,8 +99,6 @@ bool Mem::allocate(int algo, int threads, bool doubleHash, bool enabled) void Mem::release() { - const int size = MEMORY * (m_threads + 1); - if(m_flags & HugepagesEnabled) { if(m_flags & Lock) diff --git a/src/net/Job.cpp b/src/net/Job.cpp index dd4258cf..7c2fba31 100644 --- a/src/net/Job.cpp +++ b/src/net/Job.cpp @@ -61,6 +61,7 @@ static inline char hf_bin2hex(unsigned char c) Job::Job() : m_nicehash(false), + m_coin(), m_algo(xmrig::ALGO_CRYPTONIGHT), m_poolId(-2), m_threadId(-1), @@ -75,6 +76,7 @@ Job::Job() : Job::Job(int poolId, bool nicehash, int algo, int variant) : m_nicehash(nicehash), + m_coin(), m_algo(algo), m_poolId(poolId), m_threadId(-1), @@ -168,16 +170,16 @@ bool Job::setTarget(const char* target) } -void Job::setCoin(const char* coin) +void Job::setCoin(const std::string & coin) { - if(!coin || strlen(coin) > 4) + if(m_coin.size() == 0 || m_coin.size() > 4) { - memset(m_coin, 0, sizeof(m_coin)); + m_coin.clear(); return; } - strncpy(m_coin, coin, sizeof(m_coin)); - m_algo = strcmp(m_coin, "AEON") == 0 ? xmrig::ALGO_CRYPTONIGHT_LITE : xmrig::ALGO_CRYPTONIGHT; + m_coin = coin; + m_algo = (m_coin != "AEON") ? xmrig::ALGO_CRYPTONIGHT_LITE : xmrig::ALGO_CRYPTONIGHT; } diff --git a/src/net/Job.h b/src/net/Job.h index 0d377fd0..28480cd0 100644 --- a/src/net/Job.h +++ b/src/net/Job.h @@ -31,6 +31,7 @@ #include +#include "align.h" #include "net/Id.h" #include "xmrig.h" @@ -44,7 +45,7 @@ public: bool setBlob(const char* blob); bool setTarget(const char* target); - void setCoin(const char* coin); + void setCoin(const std::string & coin); void setVariant(int variant); inline bool isNicehash() const @@ -55,11 +56,11 @@ public: { return m_size > 0 && m_diff > 0; } - inline bool setId(const char* id) + inline bool setId(const std::string & id) { return m_id.setId(id); } - inline const char* coin() const + inline const std::string & coin() const { return m_coin; } @@ -127,7 +128,7 @@ public: private: bool m_nicehash; - char m_coin[5]; + std::string m_coin; int m_algo; int m_poolId; int m_threadId; @@ -135,7 +136,7 @@ private: size_t m_size; uint64_t m_diff; uint64_t m_target; - uint8_t m_blob[96]; // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk. + VAR_ALIGN(16, uint8_t m_blob[96]); // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk. xmrig::Id m_id; }; diff --git a/src/version.h b/src/version.h index 24ee9c9e..d76b25a0 100644 --- a/src/version.h +++ b/src/version.h @@ -27,14 +27,14 @@ #define APP_ID "xmrig-eWa" #define APP_NAME "XMRig-eWa" #define APP_DESC "XMRig CPU miner-eWa" -#define APP_VERSION "3.0.3-3" +#define APP_VERSION "3.3.3-3" #define APP_DOMAIN "enWILLYado.com" #define APP_SITE "www.enWILLYado.com" #define APP_COPYRIGHT "Copyright (C) 2016-2018 xmrig.com by enWILLYado.com" #define APP_KIND "cpu" #define APP_VER_MAJOR 3 -#define APP_VER_MINOR 0 +#define APP_VER_MINOR 3 #define APP_VER_BUILD 3 #define APP_VER_REV 3 diff --git a/vs/xmrig.vcxproj b/vs/xmrig.vcxproj index 7e9a453c..c7bc631b 100644 --- a/vs/xmrig.vcxproj +++ b/vs/xmrig.vcxproj @@ -245,8 +245,8 @@ $(SolutionDir)\..\build\ $(SolutionDir)\obj\$(Platform)\$(Configuration)\ $(SolutionDir)\obj\$(Platform)\$(Configuration)\ - $(ProjectName)$(Platform)d - $(ProjectName)$(Platform) + $(ProjectName)-x$(PlatformArchitecture)d + $(ProjectName)-x$(PlatformArchitecture)d cd $(OutDir) && make -j$(NUMBER_OF_PROCESSORS) cd $(OutDir) && make clean && make -j$(NUMBER_OF_PROCESSORS) cd $(OutDir) && make clean @@ -255,8 +255,8 @@ cd $(OutDir) && make clean $(SolutionDir)\..\build\ $(SolutionDir)\obj\$(Platform)\$(Configuration)\ - $(ProjectName)$(Platform)d - $(ProjectName)$(Platform) + $(ProjectName)-x$(PlatformArchitecture)d + $(ProjectName)-x$(PlatformArchitecture)d $(SolutionDir)\obj\$(Platform)\$(Configuration)\ $(SolutionDir)\..\build\