Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions contrib/startup_regtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ start_nodes() {
dev-fast-gossip
dev-bitcoind-poll=5
experimental-dual-fund
experimental-splicing
funder-policy=match
funder-policy-mod=100
funder-min-their-funding=10000
Expand Down Expand Up @@ -407,13 +406,14 @@ stop_nodes() {
}

stop_ln() {
stop_nodes "$@"
test ! -f "$BITCOIN_DIR/regtest/bitcoind.pid" || \
(kill "$(cat "$BITCOIN_DIR/regtest/bitcoind.pid")"; \
rm "$BITCOIN_DIR/regtest/bitcoind.pid")
network=${1:-regtest}
stop_nodes "$network"
test ! -f "$BITCOIN_DIR/$network/bitcoind.pid" || \
(kill "$(cat "$BITCOIN_DIR/$network/bitcoind.pid")"; \
rm "$BITCOIN_DIR/$network/bitcoind.pid")

unset LN_NODES
unalias bt-cli
unalias bt-cli 2>/dev/null || true
}

node_info() {
Expand All @@ -428,6 +428,14 @@ node_info() {
}

destroy_ln() {
if [ -n "$LN_NODES" ]; then
printf "Nodes are still running. Stop them now with stop_ln? [y/N] "
read -r yn
case "$yn" in
[Yy]*) stop_ln ;;
*) echo "Aborting. Call stop_ln before destroy_ln."; return 1 ;;
esac
fi
rm -rf "$LIGHTNING_DIR"/l[0-9]*
}

Expand Down
Loading