From: Chris Duncan Date: Thu, 2 Jan 2025 21:48:15 +0000 (-0800) Subject: Remove unused RAF call. Warn user if pow completed without a nonce. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=117dff51f95066bcab5e24c6c4d2929696a02a45;p=libnemo.git Remove unused RAF call. Warn user if pow completed without a nonce. --- diff --git a/src/lib/workers/powgpu.ts b/src/lib/workers/powgpu.ts index 4c54e9f..04ba86c 100644 --- a/src/lib/workers/powgpu.ts +++ b/src/lib/workers/powgpu.ts @@ -364,10 +364,9 @@ export class PowGpu extends WorkerInterface { const hex = nonce.toString(16).padStart(16, '0') typeof callback === 'function' && callback(hex) return + } else { + console.warn(`PoW ended but 'found' is false for nonce: ${nonce}`) } - - // No result found. Redraw - requestAnimationFrame(() => this.#calculate(hashHex, callback, threshold)) } }