Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the order of mining.configure and mining.subscribe #81

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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