mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-18 13:22:43 -04:00
RandomX v2: don't update dataset when switching to/from it
This commit is contained in:
@@ -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