From: Chris Duncan Date: Wed, 5 Feb 2025 05:02:37 +0000 (-0800) Subject: Technically, a valid nonce can be equal to the threshold, so fix the final comparison. X-Git-Tag: v3.0.0~28 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=60a141e663ebb54d8aa409f06b4ce9450dbb0c41;p=nano-pow.git Technically, a valid nonce can be equal to the threshold, so fix the final comparison. --- 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;