diff --git a/BTCPayServer.Tests/README.md b/BTCPayServer.Tests/README.md index 29521580e..8ea5b0c25 100644 --- a/BTCPayServer.Tests/README.md +++ b/BTCPayServer.Tests/README.md @@ -41,10 +41,15 @@ You can call bitcoin-cli inside the container with `docker exec`, for example, i ``` If you are using Powershell: -``` +```powershell .\docker-bitcoin-cli.ps1 sendtoaddress "mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf" 0.23111090 ``` +You can also generate blocks: +```powershell +.\docker-bitcoin-generate.ps1 3 +``` + ### Using the test litecoin-cli Same as bitcoin-cli, but with `.\docker-litecoin-cli.ps1` and `.\docker-litecoin-cli.sh` instead. diff --git a/BTCPayServer.Tests/docker-bitcoin-generate.ps1 b/BTCPayServer.Tests/docker-bitcoin-generate.ps1 new file mode 100644 index 000000000..63ee3819f --- /dev/null +++ b/BTCPayServer.Tests/docker-bitcoin-generate.ps1 @@ -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