mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-14 00:37:55 +00:00
debug: show json methods, hide hash/target if ok
This commit is contained in:
parent
1fb9becc1f
commit
4a52d0553b
11
util.c
11
util.c
@ -559,7 +559,7 @@ bool fulltest(const uint32_t *hash, const uint32_t *target)
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_debug) {
|
||||
if (!rc || opt_debug) {
|
||||
uint32_t hash_be[8], target_be[8];
|
||||
char *hash_str, *target_str;
|
||||
|
||||
@ -572,7 +572,7 @@ bool fulltest(const uint32_t *hash, const uint32_t *target)
|
||||
|
||||
applog(LOG_DEBUG, "DEBUG: %s\nHash: %s\nTarget: %s",
|
||||
rc ? "hash <= target"
|
||||
: "hash > target (false positive)",
|
||||
: CL_YLW "hash > target (false positive)" CL_N,
|
||||
hash_str,
|
||||
target_str);
|
||||
|
||||
@ -1205,6 +1205,10 @@ 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) {
|
||||
applog(LOG_DEBUG, "method: %s", s);
|
||||
}
|
||||
|
||||
if (!strcasecmp(method, "mining.notify")) {
|
||||
ret = stratum_notify(sctx, params);
|
||||
goto out;
|
||||
@ -1368,7 +1372,8 @@ extern void applog_hash(unsigned char *hash)
|
||||
|
||||
void print_hash_tests(void)
|
||||
{
|
||||
unsigned char buf[128], hash[128], s[128];
|
||||
char s[128] = {'\0'};
|
||||
unsigned char buf[128], hash[128];
|
||||
memset(buf, 0, sizeof buf);
|
||||
|
||||
printf(CL_WHT "CPU HASH ON EMPTY BUFFER RESULTS:" CL_N "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user