]> zoso.dev Git - libnemo.git/commitdiff
Fix copypasta typos in threshold check.
authorChris Duncan <chris@zoso.dev>
Sun, 5 Jan 2025 09:36:54 +0000 (01:36 -0800)
committerChris Duncan <chris@zoso.dev>
Sun, 5 Jan 2025 09:36:54 +0000 (01:36 -0800)
src/lib/workers/powgpu.ts

index 707fcab43e120e0f414a2b0af8abff2cb9f8a6d9..a73c42b162c2e9b0ddcd1f7ad5abaf973b26d41c 100644 (file)
@@ -214,7 +214,7 @@ export class PowGpu extends WorkerInterface {
                        /**
                        * Set nonce if it passes the threshold and no other thread has set it
                        */
-                       if (BLAKE2B_IV32_1 ^ v[1u] ^ v[17u]) > ubo.threshold && atomicStore(&work.found) == 0u) {
+                       if ((BLAKE2B_IV32_1 ^ v[1u] ^ v[17u]) > ubo.threshold && atomicLoad(&work.found) == 0u) {
                                atomicStore(&work.found, 1u);
                                work.nonce.x = m[0];
                                work.nonce.y = m[1];