From 533038433d3df1550ab0713780e6c717257a6d08 Mon Sep 17 00:00:00 2001 From: Azlehria Date: Sat, 24 Mar 2018 06:58:30 -0700 Subject: [PATCH] Fix critical submission target bug --- cpp/hybridminer/cuda_sha3.cu | 9 ++++----- cpp/hybridminer/cudasolver.cu | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cpp/hybridminer/cuda_sha3.cu b/cpp/hybridminer/cuda_sha3.cu index 4a089fd..c57cb4b 100644 --- a/cpp/hybridminer/cuda_sha3.cu +++ b/cpp/hybridminer/cuda_sha3.cu @@ -567,12 +567,11 @@ bool find_message( uint64_t target, uint8_t * hash_prefix ) print_counter++; // maybe breaking the control codes into macros is a good idea . . . - printf( "\x1b[s\x1b[3;67f\x1b[38;5;221m%*.2f\x1b[0m\x1b[u", - 8, ( (double)printable_hashrate_cnt / t / 1000000 ) ); - } - - printf( "\x1b[s\x1b[3;29f\x1b[38;5;208m%*" PRIu64 "\x1b[0m\x1b[u", + printf( "\x1b[s\x1b[3;67f\x1b[38;5;221m%*.2f\x1b[0m\x1b[u" + "\x1b[s\x1b[3;29f\x1b[38;5;208m%*" PRIu64 "\x1b[0m\x1b[u", + 8, ( (double)printable_hashrate_cnt / t / 1000000 ), 26, printable_hashrate_cnt ); + } return ( h_done[0] > 0 ); } diff --git a/cpp/hybridminer/cudasolver.cu b/cpp/hybridminer/cudasolver.cu index 840426d..1d2156f 100644 --- a/cpp/hybridminer/cudasolver.cu +++ b/cpp/hybridminer/cudasolver.cu @@ -251,7 +251,7 @@ CUDASolver::bytes_t CUDASolver::findSolution() hash_prefix[i + 32] = (uint8_t)m_address[i]; } - uint32_t diff = m_diff; + uint64_t diff = m_diff; CUDASolver::bytes_t byte_solution( 32 ); h_done[0] = 0;