From 71670ca9c9cf7ee4a34ba2082bc039ea0e83244c Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 19 Mar 2019 12:57:57 -0600 Subject: [PATCH] make nat setting optional when running sim --- tests/simulation/run_node.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/simulation/run_node.sh b/tests/simulation/run_node.sh index 301390076..559665f61 100755 --- a/tests/simulation/run_node.sh +++ b/tests/simulation/run_node.sh @@ -12,7 +12,11 @@ DATA_DIR=$SIMULATION_DIR/node-${1} V_PREFIX="$VALIDATORS_DIR/v$(printf '%06d' ${1})" PORT=$(printf '5%04d' ${1}) -MYIP=$(curl -s ifconfig.me) + +NAT_FLAG="" +if [ "${NAT:-}" == "1" ]; then + NAT_FLAG="--nat:extip:$(curl -s ifconfig.me)" +fi $BEACON_NODE_BIN \ --network:$NETWORK_METADATA_FILE \ @@ -29,6 +33,6 @@ $BEACON_NODE_BIN \ --validator:${V_PREFIX}9.privkey \ --tcpPort:$PORT \ --udpPort:$PORT \ - --nat:extip:$MYIP \ + $NAT_FLAG \ --stateSnapshot:$SNAPSHOT_FILE