mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-12 18:49:42 +01:00
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 <rusty@rustcorp.com.au>
This commit is contained in:
parent
a3a33fe3be
commit
39fbced71e
1 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,11 @@ else
|
||||||
# This mirrors "type" output above.
|
# This mirrors "type" output above.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Test for cln-gprc
|
||||||
|
if "$LIGHTNINGD" --help | grep -q grpc; then
|
||||||
|
HAVE_GRPC=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$LIGHTNING_DIR" ]; then
|
if [ -z "$LIGHTNING_DIR" ]; then
|
||||||
# Default is to use the /tmp directory
|
# Default is to use the /tmp directory
|
||||||
LIGHTNING_DIR=/tmp
|
LIGHTNING_DIR=/tmp
|
||||||
|
@ -206,6 +211,11 @@ funder-lease-requests-only=false
|
||||||
echo "clnrest-port=$((3109+i))" >> "$LIGHTNING_DIR/l$i/config"
|
echo "clnrest-port=$((3109+i))" >> "$LIGHTNING_DIR/l$i/config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Grpc port too
|
||||||
|
if [ -n "$HAVE_GRPC" ]; then
|
||||||
|
echo "grpc-port=$((9736+i))" >> "$LIGHTNING_DIR/l$i/config"
|
||||||
|
fi
|
||||||
|
|
||||||
# Start the lightning nodes
|
# Start the lightning nodes
|
||||||
test -f "$LIGHTNING_DIR/l$i/lightningd-$network.pid" || \
|
test -f "$LIGHTNING_DIR/l$i/lightningd-$network.pid" || \
|
||||||
$EATMYDATA "$LIGHTNINGD" "--network=$network" "--lightning-dir=$LIGHTNING_DIR/l$i" "--bitcoin-datadir=$BITCOIN_DIR" "--database-upgrade=true" &
|
$EATMYDATA "$LIGHTNINGD" "--network=$network" "--lightning-dir=$LIGHTNING_DIR/l$i" "--bitcoin-datadir=$BITCOIN_DIR" "--database-upgrade=true" &
|
||||||
|
|
Loading…
Add table
Reference in a new issue