const seed = (BigInt(random0) << 32n) | BigInt(random1)
if (this.#debug) console.log('seed', seed.toString(16).padStart(16, '0'))
const data = await this.#dispatch(this.#searchPipeline, seed, hash, threshold, effort)
- nonce = data.getBigUint64(0, true)
- this.#busy = !data.getUint32(8)
+ const found = !!data.getUint32(0)
+ nonce = data.getBigUint64(8, true)
if (this.#debug) console.log('result', data.getBigUint64(16).toString(16).padStart(16, '0'))
+ this.#busy = !found
times.push(performance.now() - start)
} while (this.#busy)
if (this.#debug) this.#logAverages(times)
const seed = BigInt(`0x${work}`)
if (this.#debug) console.log('work', work)
const data = await this.#dispatch(this.#validatePipeline, seed, hash, threshold, 1)
- const nonce = data.getBigUint64(0, true)
- const found = !!data.getUint32(8)
+ const found = !!data.getUint32(0)
+ const nonce = data.getBigUint64(8, true)
if (this.#debug) console.log('result', data.getBigUint64(16).toString(16).padStart(16, '0'))
this.#busy = false
if (this.#debug) console.log('nonce', nonce, nonce.toString(16).padStart(16, '0'))