mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Miner: filter invalid algos
This commit is contained in:
parent
7b38af703e
commit
189cc78d44
2 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ public:
|
|||
|
||||
inline bool isCN() const { auto f = family(); return f == CN || f == CN_LITE || f == CN_HEAVY || f == CN_PICO; }
|
||||
inline bool isEqual(const Algorithm &other) const { return m_id == other.m_id; }
|
||||
inline bool isValid() const { return m_id != INVALID; }
|
||||
inline bool isValid() const { return m_id != INVALID && family() != UNKNOWN; }
|
||||
inline const char *name() const { return name(false); }
|
||||
inline const char *shortName() const { return name(true); }
|
||||
inline Family family() const { return family(m_id); }
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
for (int i = 0; i < Algorithm::MAX; ++i) {
|
||||
const Algorithm algo(static_cast<Algorithm::Id>(i));
|
||||
|
||||
if (isEnabled(algo)) {
|
||||
if (algo.isValid() && isEnabled(algo)) {
|
||||
algorithms.push_back(algo);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue