From 174ef21b18ad4b14fdb2c5c0b9ffb6d308e2207c Mon Sep 17 00:00:00 2001 From: Skot Date: Tue, 9 Jan 2024 22:57:51 -0500 Subject: [PATCH] Changed order of stratum messages for #80 --- .vscode/settings.json | 6 ++++-- main/tasks/stratum_task.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5ec8246c..078d6c50 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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" } \ No newline at end of file diff --git a/main/tasks/stratum_task.c b/main/tasks/stratum_task.c index e628861b..f93b116a 100644 --- a/main/tasks/stratum_task.c +++ b/main/tasks/stratum_task.c @@ -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);