2019-03-19 20:51:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
NETWORK_NAME=$1
|
|
|
|
NODE_ID=$2
|
|
|
|
FIRST_VALIDATOR=$3
|
|
|
|
LAST_VALIDATOR=$4
|
|
|
|
|
|
|
|
cd $(dirname "$0")
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
if [ -f .env ]; then
|
|
|
|
source .env
|
|
|
|
fi
|
|
|
|
|
|
|
|
NETWORK_DIR=$WWW_DIR/$NETWORK_NAME
|
|
|
|
|
|
|
|
for i in $(seq $FIRST_VALIDATOR $LAST_VALIDATOR); do
|
|
|
|
VALIDATOR=v$(printf '%07d' $i)
|
2019-10-28 23:04:52 +00:00
|
|
|
beacon_chain/beacon_node --data-dir="$DATA_DIR/node-$NODE_ID" importValidator \
|
2019-03-19 20:51:22 +00:00
|
|
|
--keyfile="$NETWORK_DIR/$VALIDATOR.privkey"
|
|
|
|
done
|
|
|
|
|