]> zoso.dev Git - libnemo.git/commitdiff
Remove unused RAF call. Warn user if pow completed without a nonce.
authorChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 21:48:15 +0000 (13:48 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 21:48:15 +0000 (13:48 -0800)
src/lib/workers/powgpu.ts

index 4c54e9fb8d38e5654d6c957cb55edee67f84b72a..04ba86c686f700b025902ba3649d621d55c81c45 100644 (file)
@@ -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))
        }
 }