let start = performance.now()
let nonce = 0n
let result = 0n
+ let random = BigInt(Math.floor(Math.random() * 0xffffffff))
+ let seed = random
do {
start = performance.now()
- const random0 = Math.floor(Math.random() * 0xffffffff)
- const random1 = Math.floor(Math.random() * 0xffffffff)
- const seed = (BigInt(random0) << 32n) | BigInt(random1)
+ random = BigInt(Math.floor(Math.random() * 0xffffffff))
+ seed = (seed & 0xffffffffn) << 32n | random
if (this.#debug) console.log('seed', seed.toString(16).padStart(16, '0'))
await this.#dispatch(this.#searchPipeline, seed, hash, difficulty, effort)
const found = !!this.#resultView.getUint32(0)