- if we are not connected and if we are downloading the block-chain don't start the mining threads
- this pull makes the setgenerate-call explicit, which I found out to be a good thing as we don't have 4 idle threads when not needed and it prevents mining under erroneous conditions (which I was able to trigger sometimes before this patch and which lead to orphan blocks)
- the internal miner is only used for testnet anyway these days, but I love it for that scenario
extend setgenerate RPC-call with 2 pre-checks #1989
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:setgenerate changing 1 files +6 −0-
Diapolo commented at 7:27 AM on November 5, 2012: none
-
be185368a0
extend setgenerate RPC-call with 2 pre-checks
- if we are not connected and if we are downloading the block-chain don't start the mining threads - this pull makes the setgenerate-call explicit, which I found out to be a good thing as we don't have 4 idle threads when not needed and it prevents mining under erroneous conditions (which I was able to trigger sometimes before this patch and which lead to orphan blocks) - the internal miner is only used for testnet anyway these days, but I love it for that scenario
-
jgarzik commented at 5:54 PM on November 5, 2012: contributor
I understand the motivation -- I use the internal miner every day on testnet -- but this change would defeat anyone who scripts setgenerate-on-startup, because it does not automatically re-enable mining once IBD is complete.
-
Diapolo commented at 6:39 PM on November 5, 2012: none
You are right, but to automatically enable the miner it would still be possible to use -gen or set it via the bitcoin.conf. But if you see no way that this options suffice, you are free to close the pull.
-
gavinandresen commented at 7:11 PM on November 5, 2012: contributor
I agree with jgarzik. Closing.
- gavinandresen closed this on Nov 5, 2012
- KolbyML referenced this in commit da927fc31b on Dec 5, 2020
- DrahtBot locked this on Sep 8, 2021
Contributors