Skip to content

Commit

Permalink
stratum: handle XSH multialgo pow_hash special field (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
opensourcerulez authored and tpruvot committed Jul 8, 2018
1 parent d85425b commit 0c542e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stratum/share.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,10 @@ bool block_confirm(int coinid, const char *blockhash)
}
const char *h1 = json_get_string(json_res, "pow_hash"); // DGB, MYR, J
const char *h2 = json_get_string(json_res, "mined_hash"); // XVG
const char *h3 = json_get_string(json_res, "phash"); // XSH
if (h1) snprintf(hash, 161, "%s", h1);
else if (h2) snprintf(hash, 161, "%s", h2);
else if (h3) snprintf(hash, 161, "%s", h3);
//debuglog("%s: getblock %s -> pow %s\n", __func__, blockhash, hash);
json_value_free(json);
break;
Expand Down

0 comments on commit 0c542e8

Please sign in to comment.