]> zoso.dev Git - nano-pow.git/commitdiff
Add data to error message.
authorChris Duncan <chris@zoso.dev>
Wed, 15 Jan 2025 22:41:12 +0000 (14:41 -0800)
committerChris Duncan <chris@zoso.dev>
Wed, 15 Jan 2025 22:41:12 +0000 (14:41 -0800)
src/classes/gpu.ts

index f4eba87395349e11fd7d6af9d4d0d2e6419868b1..3a69199bb53dea1423e4d1511c0932c89994c851 100644 (file)
@@ -271,7 +271,7 @@ export class NanoPowGpu {
                const nonce = data.getBigUint64(0, true).toString(16).padStart(16, '0')
                const found = !!data.getUint32(8)
                this.#busy = false
-               if (found && work !== nonce) throw new Error(`Nonce found but does not match work`)
+               if (found && work !== nonce) throw new Error(`Nonce (${nonce}) found but does not match work (${work})`)
                return found
        }
 }