From: Chris Duncan Date: Fri, 17 Jan 2025 22:05:22 +0000 (-0800) Subject: Increase allowed effort. X-Git-Tag: v2.0.0~22 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=bab726203be432a561b616df46cbb1bb08873189;p=nano-pow.git Increase allowed effort. --- diff --git a/src/classes/gpu.ts b/src/classes/gpu.ts index 32f251b..36937bb 100644 --- a/src/classes/gpu.ts +++ b/src/classes/gpu.ts @@ -215,7 +215,7 @@ export class NanoPowGpu { const threshold = (typeof options?.threshold !== 'number' || options.threshold < 0x0 || options.threshold > 0xffffffff) ? 0xfffffff8 : options.threshold - const effort = (typeof options?.effort !== 'number' || options.effort < 0x1 || options.effort > 0x10) + const effort = (typeof options?.effort !== 'number' || options.effort < 0x1 || options.effort > 0x20) ? 0x800 : options.effort * 0x100 const debug = !!(options?.debug) @@ -241,9 +241,7 @@ export class NanoPowGpu { this.#busy = !data.getUint32(8) times.push(performance.now() - start) } while (this.#busy) - if (debug) { - this.#logAverages(times) - } + if (debug) this.#logAverages(times) return nonce.toString(16).padStart(16, '0') }