* Set nonce if it passes the difficulty threshold and no other thread has set it.
*/
var result: vec2<u32> = BLAKE2B_INIT[0u] ^ v0 ^ v8;
- if (validate || ((result.y > ubo.difficulty.y || (result.y == ubo.difficulty.y && result.y >= ubo.difficulty.y)) && atomicLoad(&work.found) == 0u)) {
+ if (validate || ((result.y > ubo.difficulty.y || (result.y == ubo.difficulty.y && result.x >= ubo.difficulty.x)) && atomicLoad(&work.found) == 0u)) {
atomicStore(&work.found, 1u);
work.nonce = m0;
work.result = result;