Fix stratum message order (#498)

This commit is contained in:
mutatrum 2024-11-21 17:45:08 +01:00 committed by GitHub
parent b9126910d6
commit 48711ef0a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -23,8 +23,8 @@ typedef enum
CLIENT_RECONNECT
} stratum_method;
static const int STRATUM_ID_SUBSCRIBE = 1;
static const int STRATUM_ID_CONFIGURE = 2;
static const int STRATUM_ID_CONFIGURE = 1;
static const int STRATUM_ID_SUBSCRIBE = 2;
typedef struct
{

View File

@ -236,12 +236,12 @@ void stratum_task(void * pvParameters)
cleanQueue(GLOBAL_STATE);
///// Start Stratum Action
// mining.subscribe - ID: 1
STRATUM_V1_subscribe(GLOBAL_STATE->sock, GLOBAL_STATE->asic_model_str);
// mining.configure - ID: 2
// mining.configure - ID: 1
STRATUM_V1_configure_version_rolling(GLOBAL_STATE->sock, &GLOBAL_STATE->version_mask);
// mining.subscribe - ID: 2
STRATUM_V1_subscribe(GLOBAL_STATE->sock, GLOBAL_STATE->asic_model_str);
char * username = GLOBAL_STATE->SYSTEM_MODULE.is_using_fallback ? nvs_config_get_string(NVS_CONFIG_FALLBACK_STRATUM_USER, FALLBACK_STRATUM_USER) : nvs_config_get_string(NVS_CONFIG_STRATUM_USER, STRATUM_USER);
char * password = GLOBAL_STATE->SYSTEM_MODULE.is_using_fallback ? nvs_config_get_string(NVS_CONFIG_FALLBACK_STRATUM_PASS, FALLBACK_STRATUM_PW) : nvs_config_get_string(NVS_CONFIG_STRATUM_PASS, STRATUM_PW);