Added coin field support added in xmrig-proxy 2.5.
This commit is contained in:
parent
37ac1aa62c
commit
84970e9e9b
3 changed files with 20 additions and 0 deletions
|
@ -65,6 +65,7 @@ Job::Job(int poolId, bool nicehash, bool monero) :
|
|||
m_diff(0),
|
||||
m_target(0)
|
||||
{
|
||||
memset(m_coin, 0, sizeof(m_coin));
|
||||
}
|
||||
|
||||
|
||||
|
@ -148,6 +149,18 @@ bool Job::setTarget(const char *target)
|
|||
}
|
||||
|
||||
|
||||
void Job::setCoin(const char *coin)
|
||||
{
|
||||
if (!coin || strlen(coin) > 4) {
|
||||
memset(m_coin, 0, sizeof(m_coin));
|
||||
return;
|
||||
}
|
||||
|
||||
strncpy(m_coin, coin, sizeof(m_coin));
|
||||
m_monero = strcmp(m_coin, "XMR") == 0;
|
||||
}
|
||||
|
||||
|
||||
bool Job::fromHex(const char* in, unsigned int len, unsigned char* out)
|
||||
{
|
||||
bool error = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue