mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 00:37:46 +00:00
Fixed new block detection for Dero solo mining
This commit is contained in:
parent
8dc87576c5
commit
874cff3d51
1 changed files with 6 additions and 0 deletions
|
@ -269,6 +269,12 @@ bool xmrig::DaemonClient::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
m_blocktemplate = std::move(blocktemplate);
|
||||
m_prevHash = Json::getString(params, "prev_hash");
|
||||
|
||||
if (m_apiVersion == API_DERO) {
|
||||
// Truncate to 32 bytes to have the same data as in get_info RPC
|
||||
if (m_prevHash.size() > 64)
|
||||
m_prevHash.data()[64] = '\0';
|
||||
}
|
||||
|
||||
if (m_state == ConnectingState) {
|
||||
setState(ConnectedState);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue