Add support for reloading the pool config file while miner is running#1655
Add support for reloading the pool config file while miner is running#1655syncro2017 wants to merge 8 commits intofireice-uk:devfrom
Conversation
xmrstak/misc/executor.cpp
Outdated
| push_timed_event(ex_event(EV_HASHRATE_LOOP), jconf::inst()->GetAutohashTime()); | ||
|
|
||
| size_t cnt = 0; | ||
| size_t cnt = 0,i=0; |
There was a problem hiding this comment.
please remove i=0 it looks like it is not needed
There was a problem hiding this comment.
i is needed here because this variable is being used later on in one of the case statements in 2 places:
case EV_PERF_TICK:
for (i = 0; i < pvThreads->size(); i++)
telem->push_perf_value(i, pvThreads->at(i)->iHashCount.load(std::memory_order_relaxed),
pvThreads->at(i)->iTimestamp.load(std::memory_order_relaxed));
if((cnt++ & 0xF) == 0) //Every 16 ticks
{
double fHps = 0.0;
double fTelem;
bool normal = true;
for (i = 0; i < pvThreads->size(); i++)
{
fTelem = telem->calc_telemetry_data(10000, i);
if(std::isnormal(fTelem))
{
fHps += fTelem;
}
else
{
normal = false;
break;
}
}
if(normal && fHighestHps < fHps)
fHighestHps = fHps;
}
break;
| else | ||
| pools.emplace_front(0, "donate.xmr-stak.net:5555", "", "", "", 0.0, true, false, "", true); | ||
| break; | ||
| case cryptonight_heavy: |
There was a problem hiding this comment.
could you please remove all style changes that we can focus on the code.
xmrstak/misc/executor.cpp
Outdated
| telem = new xmrstak::telemetry(pvThreads->size()); | ||
|
|
||
| set_timestamp(); | ||
| void executor::init_pools(void) |
There was a problem hiding this comment.
there is not need for the explicit void
There was a problem hiding this comment.
I have removed explicit void, however coming from embedded development for mission critical apps i always put void in the func that is not supposed to take any args, but this is in C :)
|
@fireice-uk please have a look to it, do you have any arguments against this functionality? |
|
please define the variable 'i' in the for loop. defining all variables at
the beginning is old C style.
|
|
Moved variable i counter definition inside the loops as requested |
re-based changes against the dev branch as was instructed