diff --git a/tests/simulation/run_node.sh b/tests/simulation/run_node.sh index 8de368289..3260447b6 100755 --- a/tests/simulation/run_node.sh +++ b/tests/simulation/run_node.sh @@ -15,8 +15,8 @@ if [ "${NAT:-}" == "1" ]; then NAT_FLAG="--nat:extip:$(curl -s ifconfig.me)" fi -FIRST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + 1)) * $1 ))) -LAST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + 1)) * ($1 + 1) - 1 ))) +FIRST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + $NUM_MISSING_NODES)) * $1 ))) +LAST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + $NUM_MISSING_NODES)) * ($1 + 1) - 1 ))) mkdir -p $DATA_DIR/validators rm -f $DATA_DIR/validators/* diff --git a/tests/simulation/start.sh b/tests/simulation/start.sh index 9795bd089..a64ba0168 100755 --- a/tests/simulation/start.sh +++ b/tests/simulation/start.sh @@ -9,6 +9,7 @@ set -eu export NUM_VALIDATORS=${VALIDATORS:-100} export NUM_NODES=${NODES:-9} +export NUM_MISSING_NODES=${MISSING_NODES:-1} cd "$SIM_ROOT" mkdir -p "$SIMULATION_DIR"