diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-02-02 18:47:04 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-02-02 18:47:04 -0500 |
commit | c68ffb30dd17b32f69665af18b72687875770972 (patch) | |
tree | 748110c309233117b7f26bd4dc575a2904266aba /util.c | |
parent | 453101d9e9f8b7408ca645dd174aa3e8af1d87ac (diff) |
Display proof-of-work hash when one is discovered
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -255,3 +255,14 @@ timeval_subtract ( return x->tv_sec < y->tv_sec; } +void print_pow(const unsigned char *hash) +{ + char *hexstr; + unsigned char hash_swap[32]; + + swap256(hash_swap, hash); + hexstr = bin2hex(hash_swap, 32); + fprintf(stderr, "PoW found: %s\n", hexstr); + free(hexstr); +} + |