diff --git a/demo/main.js b/demo/main.js index 8f4bcf4..0bff0a7 100644 --- a/demo/main.js +++ b/demo/main.js @@ -258,7 +258,6 @@ async function handleWorkerMessage(e) { recordHashRate(workerId, hashRate) refreshHashRate() } - if (typeof best_pow === 'number') { minersBestPow[workerId] = { bestPow: best_pow, @@ -386,6 +385,7 @@ function onK3(event){ } catch(e){ console.error('Error parsing K3 content:', e) + console.warn('K3 content:', event.content) } console.log('K3 relays:', relays) diff --git a/demo/worker.js b/demo/worker.js index 7329ed4..57f8377 100644 --- a/demo/worker.js +++ b/demo/worker.js @@ -28,7 +28,6 @@ function destructureMap (map) { self.onmessage = async function (e) { const { type, event, difficulty, workerId, totalWorkers } = e.data; - console.log(e) function reportProgress(hashRate = undefined, bestPow = undefined) { let header = { type: 'progress' } @@ -37,7 +36,7 @@ self.onmessage = async function (e) { } if(bestPow !== null) { const { best_pow, nonce, hash } = destructureMap(bestPow); - postMessage({ ...header, workerId, best_pow, nonce, event }); + postMessage({ ...header, workerId, best_pow, nonce, event, hash }); } }