mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-04-11 05:19:28 +02:00
bm13xx: Handle invalid job ids in process_work
This commit is contained in:
parent
8e63b02b6c
commit
ed67d44a54
@ -672,6 +672,11 @@ task_result * BM1366_proccess_work(void * pvParameters)
|
||||
|
||||
GlobalState * GLOBAL_STATE = (GlobalState *) pvParameters;
|
||||
|
||||
if (GLOBAL_STATE->valid_jobs[rx_job_id] == 0) {
|
||||
ESP_LOGE(TAG, "Invalid job nonce found, id=%d", rx_job_id);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint32_t rolled_version = GLOBAL_STATE->ASIC_TASK_MODULE.active_jobs[rx_job_id]->version;
|
||||
|
||||
// // // shift the 16 bit value left 13
|
||||
|
@ -425,6 +425,7 @@ task_result *BM1397_proccess_work(void *pvParameters)
|
||||
if (GLOBAL_STATE->valid_jobs[rx_job_id] == 0)
|
||||
{
|
||||
ESP_LOGI(TAG, "Invalid job nonce found, id=%d", rx_job_id);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint32_t rolled_version = GLOBAL_STATE->ASIC_TASK_MODULE.active_jobs[rx_job_id]->version;
|
||||
|
Loading…
x
Reference in New Issue
Block a user