btcpayserver/BTCPayServer.Tests/docker-lightning-channel-teardown.sh

16 lines
489 B
Bash
Raw Normal View History

#!/bin/bash
2022-02-10 04:25:14 +01:00
./docker-customer-lncli.sh closeallchannels > /dev/null
./docker-merchant-lncli.sh closeallchannels > /dev/null
./docker-bitcoin-generate.sh 10 > /dev/null
channels=$(./docker-merchant-lightning-cli.sh listchannels | jq -cr '.channels | map(.short_channel_id) | unique')
for chanid in $(echo "${channels}" | jq -cr '.[]')
do
2022-02-10 04:25:14 +01:00
./docker-merchant-lightning-cli.sh close $chanid > /dev/null
done
2022-02-10 04:25:14 +01:00
./docker-bitcoin-generate.sh 10 > /dev/null
printf "All channels closed!\r\n"