Log successful submit as such
This commit is contained in:
parent
c0af3f03b1
commit
d5ac9addfe
@ -197,6 +197,7 @@ void runStratumWorker(void *name) {
|
||||
case MINING_SET_DIFFICULTY: parse_mining_set_difficulty(line, currentPoolDifficulty);
|
||||
mMiner.poolDifficulty = currentPoolDifficulty;
|
||||
break;
|
||||
case STRATUM_SUCCESS: Serial.println(" Parsed JSON: Success"); break;
|
||||
default: Serial.println(" Parsed JSON: unknown"); break;
|
||||
|
||||
}
|
||||
|
@ -142,8 +142,13 @@ stratum_method parse_mining_method(String line)
|
||||
|
||||
if (error || checkError(doc)) return STRATUM_PARSE_ERROR;
|
||||
|
||||
if (!doc.containsKey("method")) return STRATUM_UNKNOWN;
|
||||
|
||||
if (!doc.containsKey("method")) {
|
||||
// "error":null means success
|
||||
if (doc["error"].isNull())
|
||||
return STRATUM_SUCCESS;
|
||||
else
|
||||
return STRATUM_UNKNOWN;
|
||||
}
|
||||
stratum_method result = STRATUM_UNKNOWN;
|
||||
|
||||
if (strcmp("mining.notify", (const char*) doc["method"]) == 0) {
|
||||
|
@ -38,6 +38,7 @@ typedef struct {
|
||||
} mining_job;
|
||||
|
||||
typedef enum {
|
||||
STRATUM_SUCCESS,
|
||||
STRATUM_UNKNOWN,
|
||||
STRATUM_PARSE_ERROR,
|
||||
MINING_NOTIFY,
|
||||
|
Loading…
Reference in New Issue
Block a user