Make the generate RPC call function for non-regtest #7663

pull sipa wants to merge 1 commits into bitcoin:master from sipa:generatenonreg changing 2 files +18 −10
  1. sipa commented at 9:31 PM on March 9, 2016: member

    This complements #7507, allowing external scripts to take over the function of the internal setgenerate miner.

  2. Make the generate RPC call function for non-regtest 8a253b342c
  3. jonasschnelli commented at 8:02 AM on March 10, 2016: contributor

    utACK. nit: should we not exclude mainnet from generate?

  4. jonasschnelli added the label Mining on Mar 10, 2016
  5. sipa commented at 8:57 AM on March 10, 2016: member

    At best I think we can check the difficulty, and fail if it's over (say) 400, which on any CPU thread would take over a day.

  6. jonasschnelli commented at 9:09 AM on March 10, 2016: contributor

    400, which on any CPU thread would take over a day.

    This would require adjustment over time (moore's law),.. but fine for me, it's anyways a nitpick.

  7. sipa commented at 9:17 AM on March 10, 2016: member

    Ok make it 1000000.

    Or I just add a warning to the RPC help saying that using it on mainnet is pointless.

  8. jonasschnelli commented at 9:20 AM on March 10, 2016: contributor

    +1 for the warning. I guess there will be some bitcoin-novice users that type in generate 1 into the GUI console window and wait until "they have mined a couple of bitcoin" and I don't want Issues like "generate 1 takes ages to generate bitcoins". :-)

  9. sipa commented at 9:50 AM on March 10, 2016: member

    Note that the RPC will return after by default 1000000 iterations (which is typically less than a second), with however many blocks were found in that time.

  10. laanwj commented at 7:44 AM on March 11, 2016: member

    Concept ACK

    with however many blocks were found in that time.

    But never more than the number of blocks given as first argument, I hope?

  11. sipa commented at 11:19 AM on March 11, 2016: member

    Indeed. I updated the help text to clarify that.

  12. laanwj merged this on Mar 14, 2016
  13. laanwj closed this on Mar 14, 2016

  14. laanwj referenced this in commit c87f51e55b on Mar 14, 2016
  15. laanwj commented at 10:36 AM on March 14, 2016: member

    We should probably mention this in the 0.13 release notes

  16. codablock referenced this in commit 34e2f31daa on Sep 16, 2017
  17. codablock referenced this in commit e274120847 on Sep 19, 2017
  18. codablock referenced this in commit efa690302a on Dec 9, 2017
  19. codablock referenced this in commit fb4ec255c6 on Dec 19, 2017
  20. thephez referenced this in commit 923d6a4550 on Feb 22, 2018
  21. thephez referenced this in commit ded0b9a8ce on Feb 27, 2018
  22. thephez referenced this in commit 39978ec641 on Jun 11, 2018
  23. thephez referenced this in commit a7bbd654ec on Jun 11, 2018
  24. MarcoFalke 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-13 18:15 UTC

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