Skip to content

Remove clean_jobs check in create_jobs_task#1595

Open
DankMiner wants to merge 3 commits intobitaxeorg:masterfrom
DankMiner:master
Open

Remove clean_jobs check in create_jobs_task#1595
DankMiner wants to merge 3 commits intobitaxeorg:masterfrom
DankMiner:master

Conversation

@DankMiner
Copy link
Copy Markdown

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 #1587

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

esp-miner is unable to handle difficulty change following with "mining.notify" when cleanJob set to false

2 participants