Skip to content

Commit

Permalink
Changed order of stratum messages for #80
Browse files Browse the repository at this point in the history
  • Loading branch information
skot authored Jan 10, 2024
1 parent 45102fd commit 174ef21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"string_view": "c",
"*.tcc": "c"
},
"editor.formatOnSave": true,
"editor.formatOnSave": false,
"cSpell.words": [
"ssid"
]
],
"idf.port": "/dev/cu.usbmodem1434301",
"C_Cpp.intelliSenseEngine": "Tag Parser"
}
8 changes: 5 additions & 3 deletions main/tasks/stratum_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ void stratum_task(void * pvParameters)
continue;
}

STRATUM_V1_configure_version_rolling(GLOBAL_STATE->sock, &GLOBAL_STATE->version_mask);
//mining.subscribe
STRATUM_V1_subscribe(GLOBAL_STATE->sock, &GLOBAL_STATE->extranonce_str, &GLOBAL_STATE->extranonce_2_len, GLOBAL_STATE->asic_model);

STRATUM_V1_subscribe(GLOBAL_STATE->sock, &GLOBAL_STATE->extranonce_str, &GLOBAL_STATE->extranonce_2_len,
GLOBAL_STATE->asic_model);
//mining.configure
STRATUM_V1_configure_version_rolling(GLOBAL_STATE->sock, &GLOBAL_STATE->version_mask);

// This should come before the final step of authenticate so the first job is sent with the proper difficulty set
//mining.suggest_difficulty
STRATUM_V1_suggest_difficulty(GLOBAL_STATE->sock, STRATUM_DIFFICULTY);

char * username = nvs_config_get_string(NVS_CONFIG_STRATUM_USER, STRATUM_USER);
Expand Down

0 comments on commit 174ef21

Please sign in to comment.