mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 16:33:32 -05:00
Add DoubleWorker class.
This commit is contained in:
@@ -50,8 +50,9 @@ public:
|
||||
inline void setPoolId(int poolId) { m_poolId = poolId; }
|
||||
|
||||
static bool fromHex(const char* in, unsigned int len, unsigned char* out);
|
||||
static void toHex(const unsigned char* in, unsigned int len, char* out);
|
||||
static inline uint32_t *nonce(uint8_t *blob) { return reinterpret_cast<uint32_t*>(blob + 39); }
|
||||
static inline uint64_t toDiff(uint64_t target) { return 0xFFFFFFFFFFFFFFFFULL / target; }
|
||||
static void toHex(const unsigned char* in, unsigned int len, char* out);
|
||||
|
||||
private:
|
||||
int m_poolId;
|
||||
|
||||
@@ -31,6 +31,13 @@
|
||||
class JobResult
|
||||
{
|
||||
public:
|
||||
inline JobResult() : poolId(0), nonce(0) {}
|
||||
inline JobResult(int poolId, const char *jobId, uint32_t nonce, const uint8_t *result) : poolId(poolId), nonce(nonce)
|
||||
{
|
||||
memcpy(this->jobId, jobId, sizeof(this->jobId));
|
||||
memcpy(this->result, result, sizeof(this->result));
|
||||
}
|
||||
|
||||
char jobId[64];
|
||||
int poolId;
|
||||
uint32_t nonce;
|
||||
|
||||
Reference in New Issue
Block a user