1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-31 07:32:42 -05:00

Merge xmrig v6.15.0 into master

This commit is contained in:
MoneroOcean
2021-08-31 16:45:39 +00:00
258 changed files with 13719 additions and 8163 deletions

View File

@@ -351,32 +351,6 @@ bool xmrig::Client::close()
}
bool xmrig::Client::isCriticalError(const char *message)
{
if (!message) {
return false;
}
if (strncasecmp(message, "Unauthenticated", 15) == 0) {
return true;
}
if (strncasecmp(message, "your IP is banned", 17) == 0) {
return true;
}
if (strncasecmp(message, "IP Address currently banned", 27) == 0) {
return true;
}
if (strncasecmp(message, "Invalid job id", 14) == 0) {
return true;
}
return false;
}
bool xmrig::Client::parseJob(const rapidjson::Value &params, int *code)
{
if (!params.IsObject()) {
@@ -467,7 +441,7 @@ bool xmrig::Client::send(BIO *bio)
{
# ifdef XMRIG_FEATURE_TLS
uv_buf_t buf;
buf.len = BIO_get_mem_data(bio, &buf.base);
buf.len = BIO_get_mem_data(bio, &buf.base); // NOLINT(cppcoreguidelines-pro-type-cstyle-cast)
if (buf.len == 0) {
return true;
@@ -961,6 +935,32 @@ void xmrig::Client::startTimeout()
}
bool xmrig::Client::isCriticalError(const char *message)
{
if (!message) {
return false;
}
if (strncasecmp(message, "Unauthenticated", 15) == 0) {
return true;
}
if (strncasecmp(message, "your IP is banned", 17) == 0) {
return true;
}
if (strncasecmp(message, "IP Address currently banned", 27) == 0) {
return true;
}
if (strncasecmp(message, "Invalid job id", 14) == 0) {
return true;
}
return false;
}
void xmrig::Client::onClose(uv_handle_t *handle)
{
auto client = getClient(handle->data);