1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-04-17 04:59:28 -04:00

Compare commits

...

2 Commits

Author SHA1 Message Date
xmrig
3b4e38ba18 Merge pull request #3785 from SChernykh/dev
Don't reset nonce during donation rounds (possible fix for #3669)
2026-02-28 00:55:39 +07:00
SChernykh
8b33d2494b Don't reset nonce during donation rounds (possible fix for #3669) 2026-02-27 18:52:37 +01:00

View File

@@ -574,6 +574,7 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
mutex.lock(); mutex.lock();
const uint8_t index = donate ? 1 : 0; const uint8_t index = donate ? 1 : 0;
const bool same_job_index = d_ptr->job.index() == index;
d_ptr->reset = !(d_ptr->job.index() == 1 && index == 0 && d_ptr->userJobId == job.id()); d_ptr->reset = !(d_ptr->job.index() == 1 && index == 0 && d_ptr->userJobId == job.id());
@@ -593,7 +594,8 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
const bool ready = d_ptr->initRX(); const bool ready = d_ptr->initRX();
// Always reset nonce on RandomX dataset change // Always reset nonce on RandomX dataset change
if (!ready) { // Except for switching to/from donation
if (!ready && same_job_index) {
d_ptr->reset = true; d_ptr->reset = true;
} }
# else # else