RPC: Get rid of the internal miner's hashmeter#5599
Conversation
|
Code review ACK, but there is a functional change: with this code the internal miner will never search the nonce space above 0xfff. Also: how did you test this? |
|
We discussed this in #4793 . @sipa said in some outdated commit that removing |
|
@gavinandresen I haven't tested, but it's just ScanHash that returns after 0x1000 iterations - the mining loop continues with the same nonce until 0xffff0000 is reached (which could actually become 0xfffff000 then, but who cares). |
|
Tested ACK: adding a |
|
Oh, here it was the missing piece of earlier conversation: jtimon@9d12ff7#diff-4a59b408ad3778278c3aeffa7da33c3cR384 |
|
@luke-jr this is mining related, can you ACK? |
There was a problem hiding this comment.
I think this is okay, but seems unrelated from the PR description?
|
ACK, only tested on regtest since testnet-in-a-box style apparently refuses to mine in master... :/ |
|
ACK on testnet via gdb testing |
|
Better is better... so ACK. But after removing the hashmeter, and assuming we no longer care about performance of the CPU miner (we don't) it looks to me like the code could be simplified a lot by getting rid of ScanHash and just having the mining loop be: |
|
Yes, more simplifications can be done later. |
|
ut ACK. lovely to have this part of the code simplified. |
0cc0d8d Get rid of the internal miner's hashmeter (jtimon)
Removes "hashespersec" in "getmininginfo" and also removes "gethashespersec".
That also allows the removal of some code in miner.cpp, simplifying ScanHash() and BitcoinMiner().