1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-06 23:52:38 -05:00

Merge pull request #1575 from SChernykh/dev

Fixed new block detection for Dero solo mining
This commit is contained in:
xmrig
2020-03-04 00:03:12 +07:00
committed by GitHub

View File

@@ -269,6 +269,12 @@ bool xmrig::DaemonClient::parseJob(const rapidjson::Value &params, 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);
}