diff --git a/backend/amd/minethd.cpp b/backend/amd/minethd.cpp index b938f2df03af24649ca7f511bbd6380bd30c4fcd..f2f5ff41ff1360c4e1d3e847f281293f1bab5f28 100644 --- a/backend/amd/minethd.cpp +++ b/backend/amd/minethd.cpp @@ -216,14 +216,9 @@ void minethd::work_main() hash_fun(bWorkBlob, oWork.iWorkSize, bResult, cpu_ctx); if ( (*((uint64_t*)(bResult + 24))) < oWork.iTarget) - { - std::cout<<"found AMD"<<std::endl; executor::inst()->push_event(ex_event(job_result(oWork.sJobID, results[i], bResult), oWork.iPoolId)); - } else - std::cout<<"wrong AMD"<<std::endl; - - //executor::inst()->push_event(ex_event(job_result(oWork.sJobID, results[i], bResult), oWork.iPoolId)); + executor::inst()->log_result_error("AMD Invalid Result"); } iCount += pGpuCtx->rawIntensity; diff --git a/backend/nvidia/minethd.cpp b/backend/nvidia/minethd.cpp index 227a2cf2b166688837b128994887d0e70674b92c..cbee219dbffec3b1cc5b3ffb095177a9b473a2c2 100644 --- a/backend/nvidia/minethd.cpp +++ b/backend/nvidia/minethd.cpp @@ -249,12 +249,9 @@ void minethd::work_main() hash_fun(bWorkBlob, oWork.iWorkSize, bResult, cpu_ctx); if ( (*((uint64_t*)(bResult + 24))) < oWork.iTarget) - { - std::cout<<"found NVIDIA"<<std::endl; executor::inst()->push_event(ex_event(job_result(oWork.sJobID, foundNonce[i], bResult), oWork.iPoolId)); - } else - std::cout<<"wrong NVIDIA"<<std::endl; + executor::inst()->log_result_error("NVIDIA Invalid Result"); } iCount += ctx.device_blocks * ctx.device_threads; diff --git a/executor.h b/executor.h index d7fa27dff20078b110024bb66fd3b8d32c4dca2e..a3a0828ab9c938fbd89941c9f337dc94b6fa1ded 100644 --- a/executor.h +++ b/executor.h @@ -38,6 +38,7 @@ public: inline void push_event(ex_event&& ev) { oEventQ.push(std::move(ev)); } void push_timed_event(ex_event&& ev, size_t sec); + void log_result_error(std::string&& sError); constexpr static size_t invalid_pool_id = 0; constexpr static size_t dev_pool_id = 1; @@ -169,7 +170,6 @@ private: double fHighestHps = 0.0; void log_socket_error(std::string&& sError); - void log_result_error(std::string&& sError); void log_result_ok(uint64_t iActualDiff); void sched_reconnect();