diff options
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/backend/globalStates.hpp | 15 | ||||
-rw-r--r-- | xmrstak/backend/miner_work.hpp | 4 | ||||
-rw-r--r-- | xmrstak/backend/pool_data.hpp | 21 |
3 files changed, 26 insertions, 14 deletions
diff --git a/xmrstak/backend/globalStates.hpp b/xmrstak/backend/globalStates.hpp index fafd232..e1b554f 100644 --- a/xmrstak/backend/globalStates.hpp +++ b/xmrstak/backend/globalStates.hpp @@ -1,26 +1,15 @@ #pragma once -#include "miner_work.hpp" +#include "xmrstak/backend/miner_work.hpp" #include "xmrstak/misc/environment.hpp" #include "xmrstak/misc/console.hpp" +#include "xmrstak/backend/pool_data.hpp" #include <atomic> -constexpr static size_t invalid_pool_id = (-1); - namespace xmrstak { -struct pool_data -{ - uint32_t iSavedNonce; - size_t pool_id; - - pool_data() : iSavedNonce(0), pool_id(invalid_pool_id) - { - } -}; - struct globalStates { static inline globalStates& inst() diff --git a/xmrstak/backend/miner_work.hpp b/xmrstak/backend/miner_work.hpp index 438ec0d..b6456f0 100644 --- a/xmrstak/backend/miner_work.hpp +++ b/xmrstak/backend/miner_work.hpp @@ -1,5 +1,7 @@ #pragma once +#include "xmrstak/backend/pool_data.hpp" + #include <thread> #include <atomic> #include <mutex> @@ -20,7 +22,7 @@ namespace xmrstak bool bStall; size_t iPoolId; - miner_work() : iWorkSize(0), bNiceHash(false), bStall(true), iPoolId(0) { } + miner_work() : iWorkSize(0), bNiceHash(false), bStall(true), iPoolId(invalid_pool_id) { } miner_work(const char* sJobID, const uint8_t* bWork, uint32_t iWorkSize, uint64_t iTarget, bool bNiceHash, size_t iPoolId) : iWorkSize(iWorkSize), diff --git a/xmrstak/backend/pool_data.hpp b/xmrstak/backend/pool_data.hpp new file mode 100644 index 0000000..4e92359 --- /dev/null +++ b/xmrstak/backend/pool_data.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <cstdint> +#include <string> + +constexpr static size_t invalid_pool_id = (-1); + +namespace xmrstak +{ + +struct pool_data +{ + uint32_t iSavedNonce; + size_t pool_id; + + pool_data() : iSavedNonce(0), pool_id(invalid_pool_id) + { + } +}; + +} // namespace xmrstak |