Merge pull request #375 from dwightmulcahy/version

miner version is now sent to the mining pool
This commit is contained in:
BitMaker 2024-04-29 22:21:20 +02:00 committed by GitHub
commit 8f7b64d13d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "lwip/sockets.h" #include "lwip/sockets.h"
#include "utils.h" #include "utils.h"
#include "version.h"
@ -55,9 +56,9 @@ bool tx_mining_subscribe(WiFiClient& client, mining_subscribe& mSubscribe)
// Subscribe // Subscribe
id = 1; //Initialize id messages id = 1; //Initialize id messages
#ifndef HAN #ifndef HAN
sprintf(payload, "{\"id\": %u, \"method\": \"mining.subscribe\", \"params\": [\"NerdMinerV2\"]}\n", id); sprintf(payload, "{\"id\": %u, \"method\": \"mining.subscribe\", \"params\": [\"NerdMinerV2/%s\"]}\n", id, CURRENT_VERSION);
#else #else
sprintf(payload, "{\"id\": %u, \"method\": \"mining.subscribe\", \"params\": [\"HAN_SOLOminer\"]}\n", id); sprintf(payload, "{\"id\": %u, \"method\": \"mining.subscribe\", \"params\": [\"HAN_SOLOminer/%s\"]}\n", id, CURRENT_VERSION);
#endif #endif
Serial.printf("[WORKER] ==> Mining subscribe\n"); Serial.printf("[WORKER] ==> Mining subscribe\n");