tests: Error when setgenerate is used on regtest #6039

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2015_04_setgenerate_error changing 1 files +2 −0
  1. laanwj commented at 8:20 AM on April 21, 2015: member

    Ever since #5957 there has been the problem that older RPC test cases (as can be found plenty in open pulls) use setgenerate() on regtest, assuming a different interpretation of the arguments. Directly generating a number of blocks has been split off into a new method generate - however using setgenerate with the previous arguments will result in spawning an unreasonable number of threads, and well, simply not work as expected without clear indication of the error.

    Add an error to point the user at the right method.

  2. tests: Error when setgenerate is used on regtest
    Ever since #5957 there has been the problem that older RPC test cases
    (as can be found plenty in open pulls) use setgenerate() on regtest,
    assuming a different interpretation of the arguments. Directly
    generating a number of blocks has been split off into a new method
    `generate` - however using `setgenerate` with the previous arguments will
    result in spawning an unreasonable number of threads, and well, simply
    not work as expected without clear indication of the error.
    
    Add an error to point the user at the right method.
    27ce808fb5
  3. jonasschnelli commented at 8:22 AM on April 21, 2015: contributor

    utACK.

  4. laanwj added the label Tests on Apr 21, 2015
  5. sipa commented at 11:04 AM on April 21, 2015: member

    Concept & code review ACK.

  6. morcos commented at 5:02 PM on April 21, 2015: member

    ACK

  7. laanwj merged this on Apr 23, 2015
  8. laanwj closed this on Apr 23, 2015

  9. laanwj referenced this in commit 734f80a5d1 on Apr 23, 2015
  10. jrmrjnck cross-referenced this on Oct 17, 2015 from issue Don't use setgenerate on regtest by jrmrjnck
  11. freewil referenced this in commit 64ada96b5a on Oct 17, 2015
  12. bitcoin 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-05-19 06:55 UTC