mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-17 04:59:28 -04:00
Compare commits
2 Commits
6454a0abf2
...
17aa97e543
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17aa97e543 | ||
|
|
48b29fd68b |
@@ -59,6 +59,7 @@
|
||||
# include "crypto/rx/Profiler.h"
|
||||
# include "crypto/rx/Rx.h"
|
||||
# include "crypto/rx/RxConfig.h"
|
||||
# include "crypto/rx/RxAlgo.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -556,11 +557,12 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
if (job.algorithm().family() == Algorithm::RANDOM_X && !Rx::isReady(job)) {
|
||||
if (job.algorithm().family() == Algorithm::RANDOM_X) {
|
||||
if (d_ptr->algorithm != job.algorithm()) {
|
||||
stop();
|
||||
RxAlgo::apply(job.algorithm());
|
||||
}
|
||||
else {
|
||||
else if (!Rx::isReady(job)) {
|
||||
Nonce::pause(true);
|
||||
Nonce::touch();
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
inline RxSeed(const Algorithm &algorithm, const Buffer &seed) : m_algorithm(algorithm), m_data(seed) {}
|
||||
inline RxSeed(const Job &job) : m_algorithm(job.algorithm()), m_data(job.seed()) {}
|
||||
|
||||
inline bool isEqual(const Job &job) const { return m_algorithm == job.algorithm() && m_data == job.seed(); }
|
||||
inline bool isEqual(const RxSeed &other) const { return m_algorithm == other.m_algorithm && m_data == other.m_data; }
|
||||
inline bool isEqual(const Job &job) const { return isEqualSeedAlgo(job.algorithm()) && m_data == job.seed(); }
|
||||
inline bool isEqual(const RxSeed &other) const { return isEqualSeedAlgo(other.m_algorithm) && m_data == other.m_data; }
|
||||
inline const Algorithm &algorithm() const { return m_algorithm; }
|
||||
inline const Buffer &data() const { return m_data; }
|
||||
|
||||
@@ -60,6 +60,12 @@ public:
|
||||
private:
|
||||
Algorithm m_algorithm;
|
||||
Buffer m_data;
|
||||
|
||||
inline bool isEqualSeedAlgo(Algorithm other) const {
|
||||
return (m_algorithm == other) ||
|
||||
((m_algorithm == Algorithm::RX_0) && (other == Algorithm::RX_V2)) ||
|
||||
((m_algorithm == Algorithm::RX_V2) && (other == Algorithm::RX_0));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user