bitcoin/bitcoin — pull request #1989 by Diapolo (2012-11-05 07:27:58+00:00)
Title: 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