From 68453324d1480abdd71834cf33adbc1810d3ee64 Mon Sep 17 00:00:00 2001 From: ZachPrice Date: Sat, 10 Feb 2024 20:04:20 -0800 Subject: [PATCH] Revert "set target to 6" This reverts commit 043cd38de2aa892441d94b0a1835b71a4f5814a4. --- libethash-cuda/CUDAMiner.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libethash-cuda/CUDAMiner.cpp b/libethash-cuda/CUDAMiner.cpp index a5f21bb53..d5618305d 100644 --- a/libethash-cuda/CUDAMiner.cpp +++ b/libethash-cuda/CUDAMiner.cpp @@ -500,7 +500,12 @@ void CUDAMiner::compileKernel(uint64_t period_seed, uint64_t dag_elms, CUfunctio void CUDAMiner::search(uint8_t const* header, uint64_t target, uint64_t start_nonce, const dev::eth::WorkPackage& w) { - set_target(6); + set_header(*reinterpret_cast(header)); + if (m_current_target != target) + { + set_target(target); + m_current_target = target; + } // If upper 64 bits of target are 0xffffffffffffffff then any nonce would // be considered valid by GPU. Skip job.