Skip to content

Commit

Permalink
Correctly identify rejected stratum submission
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-wilson committed Feb 25, 2024
1 parent 4ac7272 commit feda660
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions components/stratum/stratum_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ void STRATUM_V1_parse(StratumApiV1Message * message, const char * stratum_json)
} else {
// parse results
cJSON * result_json = cJSON_GetObjectItem(json, "result");
if (result_json != NULL && cJSON_IsBool(result_json)) {

if (result_json == NULL){
message->response_success = false;
}
else if (cJSON_IsBool(result_json)) {
result = STRATUM_RESULT;

bool response_success = false;
if (result_json != NULL && cJSON_IsTrue(result_json)) {
response_success = true;
if (cJSON_IsTrue(result_json)) {
message->response_success = true;
}else{
message->response_success = false;
}

message->response_success = response_success;
} else {
cJSON * mask = cJSON_GetObjectItem(result_json, "version-rolling.mask");
if (mask != NULL) {
Expand Down

0 comments on commit feda660

Please sign in to comment.