From 8946a2034f062381481b2cfa427d423da0c86d12 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 25 Apr 2025 09:56:08 -0700 Subject: [PATCH] Fix effort to passes calculation. Reduce device check timeout. --- src/lib/gpu/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/gpu/index.ts b/src/lib/gpu/index.ts index ebe35ad..0262e3d 100644 --- a/src/lib/gpu/index.ts +++ b/src/lib/gpu/index.ts @@ -168,7 +168,7 @@ export class NanoPowGpu { ) { throw new TypeError(`Invalid effort ${options.effort}`) } - const effort = options.effort + const effort = options.effort * 0x100 if (typeof options.difficulty !== 'string' && typeof options.difficulty !== 'bigint' @@ -193,7 +193,7 @@ export class NanoPowGpu { let loads = 0 while (this.#device == null && loads++ < 20) { await new Promise(resolve => { - setTimeout(resolve, 500) + setTimeout(resolve, 100) }) } if (this.#device == null) { -- 2.34.1