CryptonightR support for Wownero

This commit is contained in:
SChernykh 2019-02-10 15:21:17 +01:00
parent 73852f44c6
commit e3f2c38fff
32 changed files with 11251 additions and 131 deletions

View file

@ -31,7 +31,7 @@
#include "common/net/Job.h"
static inline unsigned char hf_hex2bin(char c, bool &err)
unsigned char hf_hex2bin(char c, bool &err)
{
if (c >= '0' && c <= '9') {
return c - '0';
@ -48,7 +48,7 @@ static inline unsigned char hf_hex2bin(char c, bool &err)
}
static inline char hf_bin2hex(unsigned char c)
char hf_bin2hex(unsigned char c)
{
if (c <= 0x9) {
return '0' + c;
@ -66,7 +66,8 @@ Job::Job() :
m_size(0),
m_diff(0),
m_target(0),
m_blob()
m_blob(),
m_height(0)
{
}
@ -80,6 +81,7 @@ Job::Job(int poolId, bool nicehash, const xmrig::Algorithm &algorithm, const xmr
m_diff(0),
m_target(0),
m_blob(),
m_height(0),
m_algorithm(algorithm),
m_clientId(clientId)
{
@ -195,6 +197,12 @@ void Job::setAlgorithm(const char *algo)
}
void Job::setHeight(uint64_t height)
{
m_height = height;
}
bool Job::fromHex(const char* in, unsigned int len, unsigned char* out)
{
bool error = false;