diff --git a/CHANGELOG.md b/CHANGELOG.md index 23f0eed..45a6035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v5.8.1 +- [#1575](https://github.com/xmrig/xmrig/pull/1575) Fixed new block detection for DERO solo mining. + # v5.8.0 - [#1573](https://github.com/xmrig/xmrig/pull/1573) Added new AstroBWT algorithm for upcoming DERO fork, as `"algo": "astrobwt"` or `"coin": "dero"`. diff --git a/src/base/net/stratum/DaemonClient.cpp b/src/base/net/stratum/DaemonClient.cpp index edae8be..c545968 100644 --- a/src/base/net/stratum/DaemonClient.cpp +++ b/src/base/net/stratum/DaemonClient.cpp @@ -269,6 +269,13 @@ 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); }