extranonce
This commit is contained in:
@@ -444,11 +444,12 @@ void xmrig::CpuWorker<N>::start()
|
||||
// blocks, and also check the RandomX hash for share difficulty.
|
||||
//
|
||||
// Reconstruct the 140-byte header with the 4-byte nonce at offset 108.
|
||||
// In pool mode, bytes 112-139 of nNonce are zero (only 4-byte nonce used).
|
||||
// Bytes 112-139 come from the pool blob and may contain a per-client
|
||||
// extraNonce1 (pool embeds it at offset 112 for nonce-space partitioning).
|
||||
// We must preserve those bytes so pool-side re-verification matches.
|
||||
uint8_t blob_for_header[140];
|
||||
memcpy(blob_for_header, m_job.blob(), 108); // header base
|
||||
memset(blob_for_header + 108, 0, 32); // clear 32-byte nonce field
|
||||
memcpy(blob_for_header + 108, ¤t_job_nonces[i], 4); // 4-byte nonce at offset 108
|
||||
memcpy(blob_for_header, m_job.blob(), 140); // full blob incl. extraNonce
|
||||
memcpy(blob_for_header + 108, ¤t_job_nonces[i], 4); // overwrite only bytes 108-111
|
||||
|
||||
bool submitted = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user