Skip to content

Commit

Permalink
Release Candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
fireice-uk committed Feb 16, 2017
1 parent 321fa66 commit 81648af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
21 changes: 18 additions & 3 deletions executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions minethd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 81648af

Please sign in to comment.