92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D
92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D
+92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40
0000000000000000000000000000000000000000000000000000000000000000
badhash
8797585D56B8AEA3A62899C31FC088F9BE849BA8298A88E94F6E3112D4E55D01
expect.push(result)
const prefixes = [
+ 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
'0Xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
'0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
' 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn ',
' ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn ',
+ 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
]
for (let i = 0; i < prefixes.length; i++) {
const hash = prefixes[i]
}
const end = performance.now()
const check = await NanoPow.work_validate(result.work, result.hash, { difficulty, debug: isDebug })
- const isValid = (check.valid === '1' && BigInt(`0x${result.hash}`) === BigInt(hash.replace('n', '').replace(' f', '0xf')))
+ const isValid = (check.valid === '1' && BigInt(`0x${result.hash}`) === BigInt(`0x${hash.trim().replace('n', '').replace(/^0x/i, '')}`))
console.log(`work_generate() output for max value block hash is ${isValid === true ? 'correct' : 'incorrect'}`)
expect.push(isValid)
}