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
  1. Diapolo commented at 7:27 AM on November 5, 2012: none
    • 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
  2. 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
    be185368a0
  3. 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.

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

  5. gavinandresen commented at 7:11 PM on November 5, 2012: contributor

    I agree with jgarzik. Closing.

  6. gavinandresen closed this on Nov 5, 2012

  7. KolbyML referenced this in commit da927fc31b on Dec 5, 2020
  8. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me