More GhostRider fixes
- Fixed "difficulty is not a number" when diff is high on some pools - Fixed GhostRider compilation when WITH_KAWPOW=OFF
This commit is contained in:
parent
c6292ce9ee
commit
15e5052dd0
3 changed files with 7 additions and 6 deletions
|
@ -213,12 +213,13 @@ void xmrig::EthStratumClient::parseNotification(const char *method, const rapidj
|
|||
return;
|
||||
}
|
||||
|
||||
if (!arr[0].IsDouble()) {
|
||||
if (!arr[0].IsDouble() && !arr[0].IsUint64()) {
|
||||
LOG_ERR("%s " RED("invalid mining.set_difficulty notification: difficulty is not a number"), tag());
|
||||
return;
|
||||
}
|
||||
|
||||
m_nextDifficulty = static_cast<uint64_t>(ceil(arr[0].GetDouble() * 65536.0));
|
||||
const double diff = arr[0].IsDouble() ? arr[0].GetDouble() : arr[0].GetUint64();
|
||||
m_nextDifficulty = static_cast<uint64_t>(ceil(diff * 65536.0));
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue