Dirt-Road-Development / skale.js

https://skale-js.vercel.app
MIT License
3 stars 2 forks source link

every 2000 iterations of the POW, yield to the event loop #72

Closed tobowers closed 1 year ago

tobowers commented 1 year ago

The meat of this is in the miner.ts - I'm noticing in the browser that things just get "stuck" while the POW is working. Ultimately it probably makes sense to do this in a webworker, but for now this is a quick fix that did not seem to have noticeable impact on the time to find the right answer.

In the tests file I removed the dependency on @skaleproject/constants because for some reason it wasn't installing, and it only provides the zero address which isn't gonna change :).

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
skale-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2023 11:07am