Skip to content

1.6 fix 1234

Cédric Moreau requested to merge 1.6_fix_1234 into 1.6_fixes

Okay, I'm happy to present you an official fix for issue #1234 (closed) that should definitely fix the problems that both @librelois and @moul could have encoutered in the past with PoW.

To sum up, this fix:

  • wraps proof.ts code in a function, to avoid global conflicts
  • move specific worker code into a new class PowWorker
  • systematically synchronize all the workers for any task: if a proof is asked, then the answer is not immediately returned to the program but will first wait for other workers to have cancelled their own proof. If a cancel is triggered, same idea: the code will wait all the workers to have cancelled before returning null as proof result.

I hope you will enjoy this new version, I also tested it on Ğ1 network with more than 10 blocks long. It just works.

Happy testing :)

Edited by Éloïs

Merge request reports