mirror of
https://github.com/Blah-IM/typescript-core.git
synced 2025-06-23 16:31:08 +00:00
fix: Remove proof of work debug logging
This commit is contained in:
parent
05331f14b3
commit
14a018c02d
1 changed files with 1 additions and 8 deletions
|
@ -55,14 +55,7 @@ async function verifyPoWIsMet(signeeBytes: Uint8Array, difficulty: number) {
|
|||
const h = new Uint8Array(await crypto.subtle.digest("SHA-256", signeeBytes));
|
||||
let passed = h[zeroBytes] < nonzeroByteMax;
|
||||
for (let j = 0; j < zeroBytes; j++) passed &&= h[j] === 0;
|
||||
console.log(
|
||||
`POW: ${
|
||||
Array.from(h)
|
||||
.map((b) => b.toString(16).padStart(2, "0"))
|
||||
.join("")
|
||||
}`,
|
||||
`(${difficulty}): ${passed}`,
|
||||
);
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue