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

CP-29: fix hash rate calculation bugs #1156

Merged
merged 1 commit into from
May 14, 2020
Merged

CP-29: fix hash rate calculation bugs #1156

merged 1 commit into from
May 14, 2020

Conversation

fredericzha
Copy link
Contributor

Description

Correct hash rate calculation for rpc API "getMinerStats" and "getMinerStatistics"

Fixes Issue CP-29.

Type of change

  • [X ] Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

@fredericzha fredericzha requested a review from AionJayT May 12, 2020 07:40
@fredericzha fredericzha changed the title fix: fix hash rate calculation bugs CP-29: fix hash rate calculation bugs May 12, 2020
@AionJayT AionJayT added the bug Something isn't working label May 12, 2020
@AionJayT AionJayT added this to the 1.6 milestone May 12, 2020
Copy link
Collaborator

@AionJayT AionJayT left a comment

Choose a reason for hiding this comment

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

Could you be able to add unit test for the fix? To make sure we don't mass up the hash rate calculation.
I assume you tested with the pool software, because our CI doesn't simulate the mining pool environment.
It's better to have test case to cover it.

Moreover, the logic in the classes can be refactor better. Some of the implementation is not very clear. But we can create a ticket for that later.

@AionJayT AionJayT merged commit b2a2f0e into master May 14, 2020
@AionJayT AionJayT deleted the CP-29 branch May 21, 2020 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants