Browse Source

Add fake submit parsing and poll every second instead of millisecond

master
Con Kolivas 11 years ago
parent
commit
6a7e1bcc37
  1. 2
      src/connector.c
  2. 8
      src/stratifier.c

2
src/connector.c

@ -195,7 +195,7 @@ retry:
}
ck_runlock(&ci->lock);
ret = poll(fds, nfds, 1);
ret = poll(fds, nfds, 1000);
if (ret < 0) {
if (interrupted())
goto retry;

8
src/stratifier.c

@ -612,6 +612,11 @@ out:
return json_boolean(ret);
}
static json_t *parse_submit(stratum_instance_t *client, json_t *params_val, json_t **err_val)
{
return json_boolean(true);
}
/* We should have already determined all the values passed to this are valid
* by now. Set update if we should also send the latest stratum parameters */
static json_t *gen_json_result(int client_id, json_t *method_val, json_t *params_val,
@ -642,6 +647,9 @@ static json_t *gen_json_result(int client_id, json_t *method_val, json_t *params
if (!client->authorised)
return json_string("Unauthorised");
if (!strncasecmp(method, "mining.submit", 13))
return parse_submit(client, params_val, err_val);
return json_string("Empty");
}

Loading…
Cancel
Save