From 9cff130b2071d8f255a480b5a8710e32227e5791 Mon Sep 17 00:00:00 2001 From: ScuttoZ Date: Fri, 10 Apr 2026 11:29:51 +0200 Subject: [PATCH 1/3] contrib: removed line 10 from config in startup_regtest.sh --- contrib/startup_regtest.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/startup_regtest.sh b/contrib/startup_regtest.sh index fe0351ef3f67..33cf5d36ba8c 100755 --- a/contrib/startup_regtest.sh +++ b/contrib/startup_regtest.sh @@ -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 From f1beaaef716104c35cf2145f7d6b0174fd444883 Mon Sep 17 00:00:00 2001 From: ScuttoZ Date: Fri, 10 Apr 2026 16:23:43 +0200 Subject: [PATCH 2/3] stop_ln: replaced hardcoded path with (like in stop_nodes) and introduced failsafe to avoid errors if stop_ln is called before ever calling start_ln (in that case, stop_ln does nothing) --- contrib/startup_regtest.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/startup_regtest.sh b/contrib/startup_regtest.sh index 33cf5d36ba8c..55d0988e7e56 100755 --- a/contrib/startup_regtest.sh +++ b/contrib/startup_regtest.sh @@ -406,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() { From ba78df8b6f1df667afb2d842bd6e73a4c204935b Mon Sep 17 00:00:00 2001 From: ScuttoZ Date: Fri, 10 Apr 2026 16:28:58 +0200 Subject: [PATCH 3/3] destroy_ln: added check to see if nodes are still running. The check asks the user to run stop_ln in case running nodes are found, aborts otherwise --- contrib/startup_regtest.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/startup_regtest.sh b/contrib/startup_regtest.sh index 55d0988e7e56..1a38d21b97a2 100755 --- a/contrib/startup_regtest.sh +++ b/contrib/startup_regtest.sh @@ -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]* }