1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 08:23:34 -05:00

Merge branch 'evo' into feature-per-pool-algo

This commit is contained in:
XMRig
2019-06-26 15:44:52 +07:00
19 changed files with 283 additions and 35 deletions

View File

@@ -52,6 +52,7 @@ public:
bool isEqual(const Job &other) const;
bool setBlob(const char *blob);
bool setSeedHash(const char *hash);
bool setTarget(const char *target);
void setDiff(uint64_t diff);
@@ -63,6 +64,7 @@ public:
inline const String &id() const { return m_id; }
inline const uint32_t *nonce() const { return reinterpret_cast<const uint32_t*>(m_blob + 39); }
inline const uint8_t *blob() const { return m_blob; }
inline const uint8_t *seedHash() const { return m_seedHash; }
inline int poolId() const { return m_poolId; }
inline size_t size() const { return m_size; }
inline uint32_t *nonce() { return reinterpret_cast<uint32_t*>(m_blob + 39); }
@@ -77,9 +79,10 @@ public:
inline void setPoolId(int poolId) { m_poolId = poolId; }
# ifdef XMRIG_PROXY_PROJECT
inline char *rawBlob() { return m_rawBlob; }
inline const char *rawBlob() const { return m_rawBlob; }
inline const char *rawTarget() const { return m_rawTarget; }
inline char *rawBlob() { return m_rawBlob; }
inline const char *rawBlob() const { return m_rawBlob; }
inline const char *rawTarget() const { return m_rawTarget; }
inline const String &rawSeedHash() const { return m_rawSeedHash; }
# endif
static inline uint32_t *nonce(uint8_t *blob) { return reinterpret_cast<uint32_t*>(blob + 39); }
@@ -99,10 +102,12 @@ private:
uint64_t m_height;
uint64_t m_target;
uint8_t m_blob[kMaxBlobSize];
uint8_t m_seedHash[32];
# ifdef XMRIG_PROXY_PROJECT
char m_rawBlob[kMaxBlobSize * 2 + 8];
char m_rawTarget[24];
String m_rawSeedHash;
# endif
};