diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-02-04 11:53:51 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-02-04 11:53:51 -0500 |
commit | 51eb1b4ef9f71f018e83ed69ca04fb37d0c0626b (patch) | |
tree | d097e136ae6b19e4ff143ce17fe839377b7b9ed0 | |
parent | 98de751416740bcb48ca7504edd65ed27bafacc6 (diff) |
Move verbose proof-of-work/target comparison display into -D (debug)
-rw-r--r-- | util.c | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -283,17 +283,19 @@ bool fulltest(const unsigned char *hash, const unsigned char *target) } } - hash_str = bin2hex(hash_swap, 32); - target_str = bin2hex(target_swap, 32); - - fprintf(stderr, " Proof: %s\nTarget: %s\nTrgVal? %s\n", - hash_str, - target_str, - rc ? "YES (hash < target)" : - "no (false positive; hash > target)"); - - free(hash_str); - free(target_str); + if (opt_debug) { + hash_str = bin2hex(hash_swap, 32); + target_str = bin2hex(target_swap, 32); + + fprintf(stderr, " Proof: %s\nTarget: %s\nTrgVal? %s\n", + hash_str, + target_str, + rc ? "YES (hash < target)" : + "no (false positive; hash > target)"); + + free(hash_str); + free(target_str); + } return rc; } |