From 60a141e663ebb54d8aa409f06b4ce9450dbb0c41 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 4 Feb 2025 21:02:37 -0800 Subject: [PATCH] Technically, a valid nonce can be equal to the threshold, so fix the final comparison. --- src/shaders/compute.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index b021618..4b14509 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -1456,7 +1456,7 @@ fn main(id: vec3) { * Set nonce if it passes the threshold and no other thread has set it. * Only high bits are needed for comparison since threshold low bits are zero. */ - if ((BLAKE2B_IV_0.y ^ v0.y ^ v8.y) > ubo.threshold) { + if ((BLAKE2B_IV_0.y ^ v0.y ^ v8.y) >= ubo.threshold) { let wasFound: u32 = atomicExchange(&work.found, 1u); if (wasFound == 0u) { work.nonce = m0; -- 2.34.1