mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
Add cmd tools to generate blocks
This commit is contained in:
@@ -41,10 +41,15 @@ You can call bitcoin-cli inside the container with `docker exec`, for example, i
|
|||||||
```
|
```
|
||||||
|
|
||||||
If you are using Powershell:
|
If you are using Powershell:
|
||||||
```
|
```powershell
|
||||||
.\docker-bitcoin-cli.ps1 sendtoaddress "mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf" 0.23111090
|
.\docker-bitcoin-cli.ps1 sendtoaddress "mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf" 0.23111090
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also generate blocks:
|
||||||
|
```powershell
|
||||||
|
.\docker-bitcoin-generate.ps1 3
|
||||||
|
```
|
||||||
|
|
||||||
### Using the test litecoin-cli
|
### Using the test litecoin-cli
|
||||||
|
|
||||||
Same as bitcoin-cli, but with `.\docker-litecoin-cli.ps1` and `.\docker-litecoin-cli.sh` instead.
|
Same as bitcoin-cli, but with `.\docker-litecoin-cli.ps1` and `.\docker-litecoin-cli.sh` instead.
|
||||||
|
|||||||
3
BTCPayServer.Tests/docker-bitcoin-generate.ps1
Normal file
3
BTCPayServer.Tests/docker-bitcoin-generate.ps1
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
$bitcoind_container_id=$(docker ps -q --filter label=com.docker.compose.project=btcpayservertests --filter label=com.docker.compose.service=bitcoind)
|
||||||
|
$address=$(docker exec -ti $bitcoind_container_id bitcoin-cli -datadir="/data" getnewaddress)
|
||||||
|
docker exec -ti $bitcoind_container_id bitcoin-cli -datadir="/data" generatetoaddress $args $address
|
||||||
Reference in New Issue
Block a user