Correct handling of block submit responses for Dero

This commit is contained in:
SChernykh 2021-06-24 18:06:07 +02:00
parent cf104ebdc5
commit 6bb8913066

View file

@ -431,7 +431,16 @@ bool xmrig::DaemonClient::parseResponse(int64_t id, const rapidjson::Value &resu
return true;
}
if (handleSubmitResponse(id)) {
const char* error_msg = nullptr;
if ((m_apiVersion == API_DERO) && result.HasMember("status")) {
error_msg = result["status"].GetString();
if (!error_msg || (strlen(error_msg) == 0) || (strcmp(error_msg, "OK") == 0)) {
error_msg = nullptr;
}
}
if (handleSubmitResponse(id, error_msg)) {
getBlockTemplate();
return true;
}