Remove clean_jobs check in create_jobs_task#1595
Open
DankMiner wants to merge 3 commits intobitaxeorg:masterfrom
Open
Remove clean_jobs check in create_jobs_task#1595DankMiner wants to merge 3 commits intobitaxeorg:masterfrom
DankMiner wants to merge 3 commits intobitaxeorg:masterfrom
Conversation
Remove unnecessary check for clean_jobs in job creation task. When a `mining.notify` with `cleanJob=false` was received (e.g. after a `mining.set_difficulty` or new mempool transactions), `create_jobs_task` skipped calling `generate_work()` due to an early `continue`. This meant the ASIC never received the new job and kept mining the previous nonce space. Once the ASIC exhausted and wrapped its nonce range, it resubmitted previously found solutions, causing persistent duplicate share rejections until the next `cleanJob=true` notify arrived. The `cleanJob` flag is already handled correctly in `stratum_task.c`, which flushes the stratum queue when `cleanJob=true`. The flag should only control whether queued jobs are discarded — not whether the ASIC receives new work. Removed the `cleanJob=false` guard in `create_jobs_task.c` so that every `mining.notify` results in `generate_work()` being called. Fixes bitaxeorg#1587
WantClue
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove unnecessary check for clean_jobs in job creation task.
When a
mining.notifywithcleanJob=falsewas received (e.g. after amining.set_difficultyor new mempool transactions),create_jobs_taskskipped callinggenerate_work()due to an earlycontinue. This meant the ASIC never received the new job and kept mining the previous nonce space. Once the ASIC exhausted and wrapped its nonce range, it resubmitted previously found solutions, causing persistent duplicate share rejections until the nextcleanJob=truenotify arrived.The
cleanJobflag is already handled correctly instratum_task.c, which flushes the stratum queue whencleanJob=true. The flag should only control whether queued jobs are discarded — not whether the ASIC receives new work.Removed the
cleanJob=falseguard increate_jobs_task.cso that everymining.notifyresults ingenerate_work()being called.Fixes #1587