diff --git a/contrib/startup_regtest.sh b/contrib/startup_regtest.sh index ed8be7299..6711fd7d5 100755 --- a/contrib/startup_regtest.sh +++ b/contrib/startup_regtest.sh @@ -72,6 +72,11 @@ else # This mirrors "type" output above. fi +# Test for cln-gprc +if "$LIGHTNINGD" --help | grep -q grpc; then + HAVE_GRPC=1 +fi + if [ -z "$LIGHTNING_DIR" ]; then # Default is to use the /tmp directory LIGHTNING_DIR=/tmp @@ -206,6 +211,11 @@ funder-lease-requests-only=false echo "clnrest-port=$((3109+i))" >> "$LIGHTNING_DIR/l$i/config" fi + # Grpc port too + if [ -n "$HAVE_GRPC" ]; then + echo "grpc-port=$((9736+i))" >> "$LIGHTNING_DIR/l$i/config" + fi + # Start the lightning nodes 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" &