1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-10 14:57:53 +00:00

debug: a new boolean to log or not json rpc data

This commit is contained in:
Tanguy Pruvot 2014-09-02 03:38:57 +02:00
parent 1f99aae0ff
commit 1b8c3c12fa
3 changed files with 8 additions and 1 deletions

View File

@ -168,6 +168,7 @@ static const char *algo_names[] = {
};
bool opt_debug = false;
bool opt_debug_rpc = false;
bool opt_protocol = false;
bool opt_benchmark = false;
bool want_longpoll = true;
@ -522,6 +523,10 @@ static bool submit_upstream_work(CURL *curl, struct work *work)
json_decref(val);
}
if (opt_debug_rpc) {
applog(LOG_DEBUG, "submit: %s", s);
}
rc = true;
out:
@ -1325,6 +1330,7 @@ static void parse_arg (int key, char *arg)
break;
case 'D':
opt_debug = true;
opt_debug_rpc = true;
break;
case 'p':
free(rpc_pass);

View File

@ -285,6 +285,7 @@ struct work_restart {
};
extern bool opt_debug;
extern bool opt_debug_rpc;
extern bool opt_protocol;
extern int opt_timeout;
extern bool want_longpoll;

2
util.c
View File

@ -1205,7 +1205,7 @@ bool stratum_handle_method(struct stratum_ctx *sctx, const char *s)
id = json_object_get(val, "id");
params = json_object_get(val, "params");
if (opt_debug) {
if (opt_debug_rpc) {
applog(LOG_DEBUG, "method: %s", s);
}