Regression test mode

From Bitcoin Wiki
Jump to navigation Jump to search

You can run bitcoin in regression test mode with the -regtest command-line argument. This runs a local-only server and lets you generate blocks instantly. Use regtest for app development and testing purposes.

Regtest uses its own chain, in which blocks can be solved instantly.[1] The difficulty is never retargeted, and the block subsidy halves every 150 blocks. The default peer-to-peer port is 18444.[2] Blocks are created on request with RPC commands such as generatetoaddress and generatetodescriptor.[3]

See also

References

  1. ↑ chainparamsbase.cpp, Bitcoin Core source tree.
  2. ↑ chainparams.cpp, Bitcoin Core source tree.
  3. ↑ rpc/mining.cpp, Bitcoin Core source tree.