Skip to content

Commit

Permalink
Merge pull request #43 from droghio/v1.0-api
Browse files Browse the repository at this point in the history
Update API endpoints for v1.0
  • Loading branch information
lukechampine authored Jun 28, 2016
2 parents 19b7da4 + 5ac98ab commit e1fd03e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions network.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int check_http_response(CURL *curl) {
if (http_code == 400) {
fprintf(stderr, "HTTP error %lu - check that the wallet is unlocked\n", http_code);
return 1;
} else if (http_code != 200) {
} else if (http_code < 200 || http_code > 299) {
fprintf(stderr, "HTTP error %lu\n", http_code);
return 1;
}
Expand All @@ -43,8 +43,8 @@ int check_http_response(CURL *curl) {
void set_host(char *host, char *port) {
bfw_url = malloc(21 + strlen(host) + strlen(port));
submit_url = malloc(20 + strlen(host) + strlen(port));
sprintf(bfw_url, "%s%s/miner/headerforwork", host, port);
sprintf(submit_url, "%s%s/miner/submitheader", host, port);
sprintf(bfw_url, "%s%s/miner/header", host, port);
sprintf(submit_url, "%s%s/miner/header", host, port);
}

// Write network data to a buffer (inBuf)
Expand Down

0 comments on commit e1fd03e

Please sign in to comment.