log invalid backend results

- executor.h: expose log_`result_error()`
- register wrong results
This commit is contained in:
psychocrypt
2017-09-30 23:46:08 +02:00
parent 39d144639f
commit e5b0319d5a
3 changed files with 3 additions and 11 deletions
+1 -6
View File
@@ -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;
+1 -4
View File
@@ -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;
+1 -1
View File
@@ -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();