]> zoso.dev Git - libnemo.git/commitdiff
Ensure nonce hex string is 16 characters.
authorChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 21:47:03 +0000 (13:47 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 21:47:03 +0000 (13:47 -0800)
src/lib/workers/powgpu.ts

index 961622d3f5a67eade4e24754b9b41a51dcdbcfbb..4c54e9fb8d38e5654d6c957cb55edee67f84b72a 100644 (file)
@@ -361,7 +361,7 @@ export class PowGpu extends WorkerInterface {
                console.log(`found: ${found}`)
                console.log(`nonce: ${nonce}`)
                if (found) {
-                       const hex = nonce.toString(16)
+                       const hex = nonce.toString(16).padStart(16, '0')
                        typeof callback === 'function' && callback(hex)
                        return
                }