Resurrect gethashespersec #12
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
Epic
good first issue
hacktoberfest
hard fork
help wanted
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
soft fork
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
work in progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbrycrd#12
Loading…
Reference in a new issue
No description provided.
Delete branch "get-hashes-per-sec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The original gethashespersec rpc command was implemented in bitcoin core, but was removed in Jan 2015 shortly before they removed the internal miner. Most of the code has been copied verbatim, but there were some structural file changes, as well as api changes, that I've adjusted for. When I ran this, I got 168 KH/s on my macbook.
untested ACK
@kimihiro64 could you add tests for this?
@kauffj What kind of tests are you looking for? Specifically for the rpc part, or the logic for the calculations/output? I'll look through the other tests and see if I can't figure some out.
Its always good to have tests, but since there's no easy way to validate the accuracy of this command, I'd just write a one line test that checks for the presence of this command (see rpc_tests.cpp). This will make sure that we don't accidentally remove this RPC when we merge from Bitcoin.
Just ran this pull request and seems to be working so ACK.