Move verbose proof-of-work/target comparison display into -D (debug)

This commit is contained in:
Jeff Garzik 2011-02-04 11:53:51 -05:00 committed by Jeff Garzik
parent 98de751416
commit 51eb1b4ef9

20
util.c
View file

@ -283,17 +283,19 @@ bool fulltest(const unsigned char *hash, const unsigned char *target)
} }
} }
hash_str = bin2hex(hash_swap, 32); if (opt_debug) {
target_str = bin2hex(target_swap, 32); hash_str = bin2hex(hash_swap, 32);
target_str = bin2hex(target_swap, 32);
fprintf(stderr, " Proof: %s\nTarget: %s\nTrgVal? %s\n", fprintf(stderr, " Proof: %s\nTarget: %s\nTrgVal? %s\n",
hash_str, hash_str,
target_str, target_str,
rc ? "YES (hash < target)" : rc ? "YES (hash < target)" :
"no (false positive; hash > target)"); "no (false positive; hash > target)");
free(hash_str); free(hash_str);
free(target_str); free(target_str);
}
return rc; return rc;
} }