Currently on JDC, if SetCustomMiningJob.Success hasn’t been received, the call to:
channel_manager_data.template_id_to_upstream_job_id.get(tid)
returns None, and as a result, we don't share the result with upstream.
This leads to valid shares being wasted.
Proposed solution:
- Cache the shares submitted before
SetCustomMiningJob.Success arrives.
- Once the success message is received, forward those cached shares appropriately.
This would ensure no shares are lost during the delay window.