Closed ghost closed 4 years ago
First of all, changing diff "on-the-fly" is the perfect recipe for a hard fork. Second, we're not going to bash the daemon RPC on every program cycle, you are free to set the time for block template requests as you wish.
Some coins changes difficulty over time in CURRENT block, and this makes block polling just after a jobrebroadcasttimeout in node-stratum-pool effectively detecting current block difficulty change and send a work restart request to miners.
https://github.com/Lightningcash-dev/node-stratum-pool
Changes in pool.js to force the new difficulty in current block detection :
https://github.com/Lightningcash-dev/node-stratum-pool/commit/e0fc581a1e364fb62023831fd927182a95e9b1b6
And changes in jobManager.js to send the new work information to miners :
https://github.com/Lightningcash-dev/node-stratum-pool/commit/6db683fc30dc6f28737e2646cb2561367ef3d5cd