-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mine 101 blocks right away (#17)
Co-authored-by: Fanis Michalakis <fanis.michalakis@ito.am>
- Loading branch information
1 parent
bca7da3
commit 4da5740
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
# Bitcoin Regtest | ||
|
||
This app is a simple bitcoin regtest node with auto-mining enabled. | ||
The node will mine 1 block every 30 seconds | ||
|
||
You can disable the auto-mining by setting the `CRON_MINE_BTC` env variable to `false` | ||
The node will mine the 101 first blocks instantly right after initialization, so that at least one coinbase is [mature](https://bitcoin.stackexchange.com/questions/1991/what-is-the-block-maturation-time) from the get go. Then, it will automatically mine 1 new block every 30 seconds. | ||
|
||
You can disable the auto-mining by setting the `CRON_MINE_BTC` env variable to `false`. Note that it also disables the mining of the first 101 blocks. | ||
|
||
The bitcoin node rpc is listening on port `18443`, to connect to the rpc use `satoshi` as username and `satoshi` as password | ||
The zmq port are `28334` for raw blocks and `28335` for raw transactions | ||
|
||
You can use the `mine` command to mine a specific amount of blocks | ||
|
||
```bash | ||
docker exec -it bitcoin-regtest mine 10 | ||
docker exec -it bitcoin-regtest mine -b 10 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters