Skip to content

Instantly share code, notes, and snippets.

@t4sk
Last active December 31, 2017 19:31
Show Gist options
  • Save t4sk/1c76a9c01b06ddf42ad8887a796bb766 to your computer and use it in GitHub Desktop.
Save t4sk/1c76a9c01b06ddf42ad8887a796bb766 to your computer and use it in GitHub Desktop.
How to get bitcoins for development using Regtest

How to get bitcoins for development using Regtest

Start bitcoind

> bitcoind -regtest -daemon

Generate block chain

> bitcoin-cli -regtest generate 101

Check balance

> bitcoin-cli -regtest getbalance
50.00000000

Spend some bitcoins

> bitcoin-cli -regtest getnewaddress
mjBpxbvtBKwRVtdSZBHeGNydfBY2s6rNYp

> $NEW_ADDRESS = mjBpxbvtBKwRVtdSZBHeGNydfBY2s6rNYp

> bitcoin-cli -regtest sendtoaddress $NEW_ADDRESS 10

Confirm transaction

> bitcoin-cli -regtest listunspent 0

References

bitcoin.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment