Resurrect gethashespersec #12

Merged
kimihiro64 merged 1 commit from get-hashes-per-sec into master 2016-07-08 22:42:58 +02:00
kimihiro64 commented 2016-07-08 15:35:04 +02:00 (Migrated from github.com)

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.

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.
kaykurokawa commented 2016-07-08 19:51:13 +02:00 (Migrated from github.com)

untested ACK

untested ACK
kauffj commented 2016-07-08 20:40:16 +02:00 (Migrated from github.com)

@kimihiro64 could you add tests for this?

@kimihiro64 could you add tests for this?
kimihiro64 commented 2016-07-08 21:34:24 +02:00 (Migrated from github.com)

@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.

@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.
kaykurokawa commented 2016-07-08 22:28:09 +02:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#12
No description provided.