Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Critical amendment to GetWorkClient #1215

Merged
merged 2 commits into from
Jun 5, 2018
Merged

Critical amendment to GetWorkClient #1215

merged 2 commits into from
Jun 5, 2018

Conversation

AndreaLanfranchi
Copy link
Collaborator

@AndreaLanfranchi AndreaLanfranchi commented Jun 4, 2018

Addresses #1213

  • Solution submit is immediate upon arrival and is no influenced by --farm-recheck value
  • Submission of hashrate is conditional
  • Renamed m_report_stratum_hashrate to m_report_hashrate as it's valid for both modes

Now even sligtly higher --farm-recheck values may be applied to mitigate overhead.

@AndreaLanfranchi AndreaLanfranchi changed the title Minimal amendment to GetWorkClient Critical amendment to GetWorkClient Jun 4, 2018
@@ -13,7 +13,7 @@ using namespace eth;
class EthGetworkClient : public PoolClient, Worker
{
public:
EthGetworkClient(unsigned const & farmRecheckPeriod);
EthGetworkClient(unsigned const & farmRecheckPeriod, bool const & submitHashrate);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. Pass both arguments by value.

// Store the solution in temp var. Will be handled in workLoop
m_solutionToSubmit = solution;
// Immediately send found solution without wait for loop
if (m_connected || m_justConnected) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the m_justConnected flag for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really do not know. I only replicated what i believe is the "connected" condition imposed in workloop. I did not write this class.

// Store the solution in temp var. Will be handled in workLoop
m_solutionToSubmit = solution;
// Immediately send found solution without wait for loop
if (m_connected || m_justConnected) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the m_justConnected flag for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really do not know. I only replicated what i believe is the "connected" condition imposed in workloop. I did not write this class.

@chfast
Copy link
Contributor

chfast commented Jun 4, 2018

Also add CHANGELOG entry.

Addresses #1213

- Solution submit is immediate upon arrival and is no influenced by
--farm-recheck value
- Submission of hashrate is conditional
- Renamed m_report_stratum_hashrate to m_report_hashrate as it's valid
for both modes

Now even sligtly higher --farm-recheck values may be applied to mitigate
overhead.
@AndreaLanfranchi AndreaLanfranchi merged commit ceb9813 into master Jun 5, 2018
@AndreaLanfranchi AndreaLanfranchi deleted the getwork branch June 5, 2018 14:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants