mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-27 22:33:29 -05:00
Added coin field support added in xmrig-proxy 2.5.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user