- Grab the latest bitcoin-core .tar.gz release and unpack it https://bitcoin.org/en/download
- Add the
bin
folder to your path - Start the regtest server
bitcoind -regtest
- Create a test wallet
bitcoin-cli -regtest createwallet test
- Get a bcrt address for your wallet
bitcoin-cli -regtest getnewaddress
- 'Mine' some regtest btc
bitcoin-cli generatetoaddress 10 <address-from-previous-command>
- Make sure it worked `bitcoin-cli getblockcount
Created
February 19, 2021 17:17
-
-
Save max-mapper/1a172d659491f2b30fd4ffe67e94b964 to your computer and use it in GitHub Desktop.
Bitcoin Regtest Local Server Instructions
Got an error when running:
bitcoin-cli generatetoaddress 10 <address-from-previous-command>
Solution:
Add -regtest
param:
bitcoin-cli -regtest generatetoaddress 10 <address-from-previous-command>
Also applies for the getblockcount
:
bitcoin-cli -regtest getblockcount
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on OSX, replace steps 1 and 2 with:
bitcoind
from bitcoin.org:curl -O https://bitcoin.org/bin/bitcoin-core-0.21.0/bitcoin-0.21.0-osx64.tar.gz
bin
dir to your $PATH