Allow setting the number of missing nodes
This commit is contained in:
parent
c32a833bf7
commit
82282928c3
|
@ -15,8 +15,8 @@ if [ "${NAT:-}" == "1" ]; then
|
||||||
NAT_FLAG="--nat:extip:$(curl -s ifconfig.me)"
|
NAT_FLAG="--nat:extip:$(curl -s ifconfig.me)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FIRST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + 1)) * $1 )))
|
FIRST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + $NUM_MISSING_NODES)) * $1 )))
|
||||||
LAST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + 1)) * ($1 + 1) - 1 )))
|
LAST_VALIDATOR_IDX=$(printf '%07d' $(( (NUM_VALIDATORS / ($NUM_NODES + $NUM_MISSING_NODES)) * ($1 + 1) - 1 )))
|
||||||
|
|
||||||
mkdir -p $DATA_DIR/validators
|
mkdir -p $DATA_DIR/validators
|
||||||
rm -f $DATA_DIR/validators/*
|
rm -f $DATA_DIR/validators/*
|
||||||
|
|
|
@ -9,6 +9,7 @@ set -eu
|
||||||
|
|
||||||
export NUM_VALIDATORS=${VALIDATORS:-100}
|
export NUM_VALIDATORS=${VALIDATORS:-100}
|
||||||
export NUM_NODES=${NODES:-9}
|
export NUM_NODES=${NODES:-9}
|
||||||
|
export NUM_MISSING_NODES=${MISSING_NODES:-1}
|
||||||
|
|
||||||
cd "$SIM_ROOT"
|
cd "$SIM_ROOT"
|
||||||
mkdir -p "$SIMULATION_DIR"
|
mkdir -p "$SIMULATION_DIR"
|
||||||
|
|
Loading…
Reference in New Issue