Skip to content

Commit 3eb00a8

Browse files
committed
fix script
1 parent 9c96199 commit 3eb00a8

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
#!/usr/bin/env bash
2+
13
source /scripts/utils.sh
24

35
DATA_DIR=/root/.ethereum
46

5-
wait_for_host_port ${BOOTSTRAP_HOST} ${BOOTSTRAP_TCP_PORT}
6-
BOOTSTRAP_IP=$(get_host_ip $BOOTSTRAP_HOST)
7-
VALIDATOR_ADDR=$(cat ${DATA_DIR}/address)
8-
HOST_IP=$(hostname -i)
7+
account_cnt=$(ls ${DATA_DIR}/keystore | wc -l)
8+
i=1
9+
unlock_sequences="0"
10+
while [ "$i" -lt ${account_cnt} ]; do
11+
unlock_sequences="${unlock_sequences},${i}"
12+
i=$((i + 1))
13+
done
914

10-
echo "validator id: ${HOST_IP}"
15+
HOST_IP=$(hostname -i)
1116

1217
ETHSTATS=""
1318
# Use exec to handle signals
1419
exec geth --config ${DATA_DIR}/config.toml --datadir ${DATA_DIR} --netrestrict ${CLUSTER_CIDR} \
15-
--verbosity ${VERBOSE} --nousb ${ETHSTATS} --state.scheme=hash --db.engine=leveldb \
16-
--bootnodes enode://${BOOTSTRAP_PUB_KEY}@${BOOTSTRAP_IP}:${BOOTSTRAP_TCP_PORT} \
17-
--mine --miner.etherbase=${VALIDATOR_ADDR} -unlock ${VALIDATOR_ADDR} --password /dev/null --blspassword /scripts/wallet_password.txt \
18-
--pprof.addr 0.0.0.0 --metrics \
19-
--rpc.allow-unprotected-txs --history.transactions 15768000 \
20-
--pprof --ipcpath /gethipc --vote --override.fixedturnlength 2 --nat extip:${HOST_IP}
20+
--state.scheme=hash --db.engine=leveldb --verbosity ${VERBOSE} --nousb ${ETHSTATS} \
21+
--unlock ${unlock_sequences} --password /dev/null --ipcpath /gethipc --override.fixedturnlength 2 -nat extip:${HOST_IP}

0 commit comments

Comments
 (0)