Working Block Polling for difficulty change in current block #171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some coins changes difficulty over time in current block, and this makes block polling for CURRENT block difficulty in node-stratum-pool work for this change.
JobRebraodcastTimeout makes stratum server check for new difficulty, and if difficulty has changed, it will print it to nomp's log as " Block notification or difficulty change through RPC polling " and effectively send new work to miners, not just new job. If it hasn't changed, it still does update the current job id, but will not send a new work request to miners.
So this change to node-stratum-pool to include possible CURRENT block difficulty changes over time and send it as new work to pool miners does work. And it doesn't changes anything else in the code.
When a new block is found OR the current block difficulty changes, after a jobrebroadcasttimeout is called, it will now print
" Block notification or Block difficulty change via RPC polling "
instead of just
" Block notification via RPC polling " .
I have tested this and confirms that it works.
https://github.com/Lightningcash-dev/node-stratum-pool
e0fc581