From f50331b147da47da228d224d0cf7e46b43a9a237 Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 6 Jul 2023 13:48:06 +0200 Subject: [PATCH] Add default RPC port depending on Zcash network The `runtime-entrypoint.sh` uses the `RPC_PORT` env var when the user specifies the `getblocktemplate-rpc` feature, but this env var is unset unless the user sets it. This commit sets the default values for `RPC_PORT` depending on `NETWORK`. --- docker/runtime-entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/runtime-entrypoint.sh b/docker/runtime-entrypoint.sh index 5eaeb7a4cc7..596cef19ac3 100755 --- a/docker/runtime-entrypoint.sh +++ b/docker/runtime-entrypoint.sh @@ -31,6 +31,11 @@ fi : "${TRACING_ENDPOINT_PORT:=3000}" # [rpc] : "${RPC_LISTEN_ADDR:=0.0.0.0}" +if [[ "${NETWORK}" = "Mainnet" ]]; then +: "${RPC_PORT:=8232}" +elif [[ "${NETWORK}" = "Testnet" ]]; then +: "${RPC_PORT:=18232}" +fi # Populate `zebrad.toml` before starting zebrad, using the environmental