fix: Remove proof of work debug logging

This commit is contained in:
Shibo Lyu 2025-05-11 02:37:52 +08:00
parent 05331f14b3
commit 14a018c02d

View file

@ -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;
}