Skip to content

Commit 39fbced

Browse files
committed
contrib/startup_regtest: set grpc-port so we can start more than one.
A side-effect of having grpc start by default. Annoyingly, if it can't bind it simply exits, with no message, so I had to guess what was happening. Reported-by: @daywalker90 Signed-off-by: Rusty Russell <[email protected]>
1 parent a3a33fe commit 39fbced

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

contrib/startup_regtest.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ else
7272
# This mirrors "type" output above.
7373
fi
7474

75+
# Test for cln-gprc
76+
if "$LIGHTNINGD" --help | grep -q grpc; then
77+
HAVE_GRPC=1
78+
fi
79+
7580
if [ -z "$LIGHTNING_DIR" ]; then
7681
# Default is to use the /tmp directory
7782
LIGHTNING_DIR=/tmp
@@ -206,6 +211,11 @@ funder-lease-requests-only=false
206211
echo "clnrest-port=$((3109+i))" >> "$LIGHTNING_DIR/l$i/config"
207212
fi
208213

214+
# Grpc port too
215+
if [ -n "$HAVE_GRPC" ]; then
216+
echo "grpc-port=$((9736+i))" >> "$LIGHTNING_DIR/l$i/config"
217+
fi
218+
209219
# Start the lightning nodes
210220
test -f "$LIGHTNING_DIR/l$i/lightningd-$network.pid" || \
211221
$EATMYDATA "$LIGHTNINGD" "--network=$network" "--lightning-dir=$LIGHTNING_DIR/l$i" "--bitcoin-datadir=$BITCOIN_DIR" "--database-upgrade=true" &

0 commit comments

Comments
 (0)