Make regtest use 210000 block reward-halving schedule #8833

issue gabegattis opened this issue on September 28, 2016
  1. gabegattis commented at 8:13 PM on September 28, 2016: none

    Regtest uses 150 blocks for the reward-halving schedule. Testnet and mainnet use 210000. Why? I thought the whole point of regtest was to have a network that was essentially identical to testnet but without proof of work. If so, it does not make sense to have this parameter be different from testnet.

    Is there a reason that this was set to 150?

    https://github.com/bitcoin/bitcoin/blob/05e1c85fb687c82ae477c72d4a7e2d6b0c692167/src/chainparams.cpp#L247

  2. MarcoFalke added the label Tests on Sep 28, 2016
  3. MarcoFalke added the label Brainstorming on Sep 28, 2016
  4. MarcoFalke commented at 8:50 PM on September 28, 2016: member

    Related: #8623

  5. laanwj commented at 5:44 AM on September 29, 2016: member

    Regtest was, as the name implies, added for the regression tests. The interval was set to a lower number for more efficient testing of the reward halving logic. Generating 210000 blocks would take ages even at the low difficulty of regtest.

  6. laanwj commented at 5:46 AM on September 29, 2016: member

    If you need something else you could use #8623, patch the number in chainparams.cpp, or even add an additional chain definition.

    At some point it would be nice to be able to load chain parameters for testing from a configuration file.

    Closing this as it isn't really an issue but a question.

  7. laanwj closed this on Sep 29, 2016

  8. 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-05-01 00:15 UTC

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