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

Merge pull request #3785 from SChernykh/dev

Don't reset nonce during donation rounds (possible fix for #3669)
This commit is contained in:
xmrig
2026-02-28 00:55:39 +07:00
committed by GitHub

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