1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-02-01 17:53:03 -05:00

RandomX v2: added commitment field to stratum submit message

This commit is contained in:
SChernykh
2026-02-01 12:32:58 +01:00
parent c2c8080783
commit 42c943c03f
6 changed files with 49 additions and 15 deletions

View File

@@ -363,8 +363,20 @@ void xmrig::CpuWorker<N>::start()
}
else
# endif
if (value < job.target()) {
JobResults::submit(job, current_job_nonces[i], m_hash + (i * 32), job.hasMinerSignature() ? miner_signature_saved : nullptr);
uint8_t* extra_data = nullptr;
if (job.algorithm().family() == Algorithm::RANDOM_X) {
if (RandomX_CurrentConfig.Tweak_V2_COMMITMENT) {
extra_data = m_commitment;
}
else if (job.hasMinerSignature()) {
extra_data = miner_signature_saved;
}
}
JobResults::submit(job, current_job_nonces[i], m_hash + (i * 32), extra_data);
}
}
m_count += N;