From 621dffeafc247d43dec47331c4cab7415f024bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Gr=C3=A4f?= Date: Thu, 7 Nov 2019 20:51:59 +0100 Subject: [PATCH] Fixed arqma coin autodetect --- src/crypto/common/Coin.cpp | 13 +++++++++++-- src/crypto/common/Coin.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/crypto/common/Coin.cpp b/src/crypto/common/Coin.cpp index f5a32851..1e1ad76d 100644 --- a/src/crypto/common/Coin.cpp +++ b/src/crypto/common/Coin.cpp @@ -49,6 +49,8 @@ struct CoinName static CoinName const coin_names[] = { { "monero", Coin::MONERO }, { "xmr", Coin::MONERO }, + { "arqma", Coin::ARQMA }, + { "arq", Coin::ARQMA }, }; @@ -58,8 +60,15 @@ static CoinName const coin_names[] = { xmrig::Algorithm::Id xmrig::Coin::algorithm(uint8_t blobVersion) const { - if (id() == MONERO) { - return (blobVersion >= 12) ? Algorithm::RX_0 : Algorithm::CN_R; + switch (id()) { + case MONERO: + return (blobVersion >= 12) ? Algorithm::RX_0 : Algorithm::CN_R; + + case ARQMA: + return (blobVersion >= 15) ? Algorithm::RX_ARQ : Algorithm::CN_PICO_0; + + case INVALID: + break; } return Algorithm::INVALID; diff --git a/src/crypto/common/Coin.h b/src/crypto/common/Coin.h index 779d60b8..3df3784b 100644 --- a/src/crypto/common/Coin.h +++ b/src/crypto/common/Coin.h @@ -40,6 +40,7 @@ public: enum Id : int { INVALID = -1, MONERO, + ARQMA };