diff options
author | fireice-uk <fireice2@o2.pl> | 2017-02-16 16:11:25 +0000 |
---|---|---|
committer | fireice-uk <fireice2@o2.pl> | 2017-02-16 16:11:25 +0000 |
commit | 81648af42bd7db49f6bed250b6d7eed7d44995db (patch) | |
tree | 9e7eb55f3fb5d402cb0306dc8a0599c51fd29d16 | |
parent | 321fa66ddd039f97ba285e3b0512f5f3ecbee2d3 (diff) | |
download | xmr-stak-81648af42bd7db49f6bed250b6d7eed7d44995db.zip xmr-stak-81648af42bd7db49f6bed250b6d7eed7d44995db.tar.gz |
Release Candidate
-rw-r--r-- | executor.cpp | 21 | ||||
-rw-r--r-- | minethd.cpp | 4 |
2 files changed, 22 insertions, 3 deletions
diff --git a/executor.cpp b/executor.cpp index 671ca65..3a1c9b2 100644 --- a/executor.cpp +++ b/executor.cpp @@ -429,10 +429,24 @@ void executor::ex_main() if((cnt++ & 0xF) == 0) //Every 16 ticks { double fHps = 0.0; - for (i = 0; i < pvThreads->size(); i++) - fHps += telem->calc_telemetry_data(2500, i); + double fTelem; + bool normal = true; - if(fHighestHps < fHps) + for (i = 0; i < pvThreads->size(); i++) + { + fTelem = telem->calc_telemetry_data(2500, i); + if(std::isnormal(fTelem)) + { + fHps += fTelem; + } + else + { + normal = false; + break; + } + } + + if(normal && fHighestHps < fHps) fHighestHps = fHps; } break; @@ -625,6 +639,7 @@ void executor::connection_report(std::string& out) jpsock* pool = pick_pool_by_id(dev_pool_id + 1); out.append("CONNECTION REPORT\n"); + out.append("Pool address : ").append(jconf::inst()->GetPoolAddress()).append(1, '\n'); if (pool->is_running() && pool->is_logged_in()) out.append("Connected since : ").append(time_format(date, sizeof(date), tPoolConnTime)).append(1, '\n'); else diff --git a/minethd.cpp b/minethd.cpp index 00cafc3..5951035 100644 --- a/minethd.cpp +++ b/minethd.cpp @@ -105,6 +105,10 @@ double telemetry::calc_telemetry_data(size_t iLastMilisec, size_t iThread) if (!bHaveFullSet || iEarliestStamp == 0 || iLastestStamp == 0) return nan(""); + //Don't think that can happen, but just in case + if (iLastestStamp - iEarliestStamp == 0) + return nan(""); + double fHashes, fTime; fHashes = iLastestHashCnt - iEarliestHashCnt; fTime = iLastestStamp - iEarliestStamp; |