mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
fix: truncate pow compute time before submitting
This commit is contained in:
@@ -19,15 +19,9 @@ onmessage = async (e) => {
|
||||
console.debug("message received at worker");
|
||||
const config: PoWConfig = e.data;
|
||||
|
||||
const t0 = performance.now();
|
||||
const work = await prove(config);
|
||||
|
||||
const t1 = performance.now();
|
||||
const duration = t1 - t0;
|
||||
|
||||
const res: ServiceWorkerWork = {
|
||||
work,
|
||||
duration,
|
||||
};
|
||||
|
||||
postMessage(res);
|
||||
|
||||
Reference in New Issue
Block a user