Fix: during proof-of-work, a maximum call stack size exceeded error could occur