btcpayserver/BTCPayServer.Tests/docker-lightning-channel-teardown.sh
Dennis Reimann 10d6e44a38
Docker: Add Lightning channel setup/teardown scripts (#1835)
An alternative for establishing the customer-merchant channel connection.
2020-08-11 14:25:12 +02:00

13 lines
380 B
Bash
Executable File

#!/bin/bash
set -e
channels=$(./docker-merchant-lightning-cli.sh listchannels | jq -cr '.channels | map(.short_channel_id) | unique')
printf "Channels: %s\n\r" $channels
for chanid in $(echo "${channels}" | jq -cr '.[]')
do
printf "Closing channel ID: %s\n\r" $chanid
./docker-merchant-lightning-cli.sh close $chanid
./docker-bitcoin-generate.sh 20 > /dev/null
done