From 21223d262750b1e081e9cea2cabd1a1591e67478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Sat, 2 Nov 2019 22:58:07 +0100 Subject: [PATCH] fix tests/simulation/run_node.sh when it's run by itself to start an additional sim node --- tests/simulation/run_node.sh | 7 ++++++- tests/simulation/start.sh | 5 ----- tests/simulation/vars.sh | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/simulation/run_node.sh b/tests/simulation/run_node.sh index 7dd97b7ec..b6cf08da0 100755 --- a/tests/simulation/run_node.sh +++ b/tests/simulation/run_node.sh @@ -1,11 +1,16 @@ #!/bin/bash -set -eu +set -e NODE_ID=${1} shift +# Read in variables source "$(dirname "$0")/vars.sh" + +# set up the environment +source "${SIM_ROOT}/../../env.sh" + cd "$GIT_ROOT" DATA_DIR="${SIMULATION_DIR}/node-$NODE_ID" diff --git a/tests/simulation/start.sh b/tests/simulation/start.sh index 0ea3f1998..7b9189c11 100755 --- a/tests/simulation/start.sh +++ b/tests/simulation/start.sh @@ -8,11 +8,6 @@ source "$(dirname "$0")/vars.sh" # set up the environment source "${SIM_ROOT}/../../env.sh" -# Set DEPOSIT_WEB3_URL_ARG to empty to get genesis state from file, not using web3 -# export DEPOSIT_WEB3_URL_ARG=--web3-url=ws://localhost:8545 -export DEPOSIT_WEB3_URL_ARG= -export DEPOSIT_CONTRACT_ADDRESS=0x - cd "$SIM_ROOT" mkdir -p "$SIMULATION_DIR" mkdir -p "$VALIDATORS_DIR" diff --git a/tests/simulation/vars.sh b/tests/simulation/vars.sh index ad75af030..3181740c7 100644 --- a/tests/simulation/vars.sh +++ b/tests/simulation/vars.sh @@ -28,4 +28,8 @@ BEACON_NODE_BIN="${SIMULATION_DIR}/beacon_node" DEPLOY_DEPOSIT_CONTRACT_BIN="${SIMULATION_DIR}/deploy_deposit_contract" MASTER_NODE_ADDRESS_FILE="${SIMULATION_DIR}/node-0/beacon_node.address" BASE_METRICS_PORT=8008 +# Set DEPOSIT_WEB3_URL_ARG to empty to get genesis state from file, not using web3 +# DEPOSIT_WEB3_URL_ARG=--web3-url=ws://localhost:8545 +DEPOSIT_WEB3_URL_ARG="" +DEPOSIT_CONTRACT_ADDRESS="0x"