Skip to content
Snippets Groups Projects
Commit e5b0319d authored by psychocrypt's avatar psychocrypt
Browse files

log invalid backend results

- executor.h: expose log_`result_error()`
- register wrong results
parent 39d14463
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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;
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment