]> zoso.dev Git - nano-pow.git/commitdiff
Increase allowed effort.
authorChris Duncan <chris@zoso.dev>
Fri, 17 Jan 2025 22:05:22 +0000 (14:05 -0800)
committerChris Duncan <chris@zoso.dev>
Fri, 17 Jan 2025 22:05:22 +0000 (14:05 -0800)
src/classes/gpu.ts

index 32f251bb00b3354e34b15533f417d37cb532dbe1..36937bb445062b892270e6f403b6c264c4ade946 100644 (file)
@@ -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')
        }