From: Chris Duncan Date: Sun, 5 Jan 2025 10:08:17 +0000 (-0800) Subject: Restart calculatino if nonce is not found, in order to accomodate smaller workgroup... X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=e95d717436bd093db3cd5aa110c0310b74610ae6;p=libnemo.git Restart calculatino if nonce is not found, in order to accomodate smaller workgroup sizes. Suboptimal but can be improved later. --- diff --git a/src/lib/workers/powgpu.ts b/src/lib/workers/powgpu.ts index a73c42b..deb688e 100644 --- a/src/lib/workers/powgpu.ts +++ b/src/lib/workers/powgpu.ts @@ -377,7 +377,7 @@ export class PowGpu extends WorkerInterface { typeof callback === 'function' && callback(hex) return } else { - console.warn(`PoW ended but 'found' is false for nonce: ${nonce}`) + setTimeout(async () => { await this.#calculate(hashHex, callback, threshold) }) } } }