-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for reloading the pool config file while miner is running #1655
base: dev
Are you sure you want to change the base?
Conversation
xmrstak/misc/executor.cpp
Outdated
@@ -600,7 +622,7 @@ void executor::ex_main() | |||
if(jconf::inst()->GetVerboseLevel() >= 4) | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove i=0
it looks like it is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please remove all style changes that we can focus on the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is fixed now
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is not need for the explicit void
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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