Skip to content
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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

syncro2017
Copy link

re-based changes against the dev branch as was instructed

@@ -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;
Copy link
Collaborator

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

Copy link
Author

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:
Copy link
Collaborator

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.

Copy link
Author

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

telem = new xmrstak::telemetry(pvThreads->size());

set_timestamp();
void executor::init_pools(void)
Copy link
Collaborator

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

Copy link
Author

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 :)

@psychocrypt
Copy link
Collaborator

psychocrypt commented Jul 2, 2018

@fireice-uk please have a look to it, do you have any arguments against this functionality?

@psychocrypt
Copy link
Collaborator

psychocrypt commented Jul 4, 2018 via email

@syncro2017
Copy link
Author

Moved variable i counter definition inside the loops as requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants