mirror of
https://github.com/GOSTSec/ccminer
synced 2025-02-09 13:24:21 +00:00
stratum: show reason of auth failure
This commit is contained in:
parent
50781f00eb
commit
b71f85ec31
6
util.cpp
6
util.cpp
@ -1354,7 +1354,11 @@ bool stratum_authorize(struct stratum_ctx *sctx, const char *user, const char *p
|
|||||||
|
|
||||||
if (!res_val || json_is_false(res_val) ||
|
if (!res_val || json_is_false(res_val) ||
|
||||||
(err_val && !json_is_null(err_val))) {
|
(err_val && !json_is_null(err_val))) {
|
||||||
applog(LOG_ERR, "Stratum authentication failed");
|
if (err_val && json_is_array(err_val)) {
|
||||||
|
const char* reason = json_string_value(json_array_get(err_val, 1));
|
||||||
|
applog(LOG_ERR, "Stratum authentication failed (%s)", reason);
|
||||||
|
}
|
||||||
|
else applog(LOG_ERR, "Stratum authentication failed");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user