mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-26 17:51:45 +01:00
stratum: don't try to check mining.suggest_difficulty result
Current implementation has a race condition with the first mining.notify message and can cause the miner to take a long time to start if it misses that message.
This commit is contained in:
parent
f6f7f39886
commit
ee04e437be
@ -230,12 +230,15 @@ int suggest_difficulty(int socket, uint32_t difficulty)
|
||||
sprintf(difficulty_msg, "{\"id\": %d, \"method\": \"mining.suggest_difficulty\", \"params\": [%d]}\n", send_uid++, difficulty);
|
||||
ESP_LOGI(TAG, "-> %s", difficulty_msg);
|
||||
write(socket, difficulty_msg, strlen(difficulty_msg));
|
||||
|
||||
/* TODO: fix race condition with first mining.notify message
|
||||
char * line;
|
||||
line = receive_jsonrpc_line(socket);
|
||||
|
||||
ESP_LOGI(TAG, "Received result %s", line);
|
||||
|
||||
free(line);
|
||||
*/
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user