January 2019
Beginner to intermediate
372 pages
11h 17m
English
Regtest is a testing blockchain for regression purposes. Unlike testnet, regtest is not a public blockchain. Regtest is a blockchain that can be created by a user for local testing purposes. This is ideal for testing features that don't need to interact very much with the network. You can create your version of the blockchain with a local genesis block. Similar to testnet, a regtest flag is added to the command to launch the process:
$ bitcoind -regtest
Since the blockchain is a local copy, the user can mine the blocks without worrying about the consensus. The following command mines 500 blocks within a few seconds, and the user will be rewarded with coins in each coinbase transaction:
$ bitcoin-cli -regtest generate 500
Read now
Unlock full access