|
|
@ -154,14 +154,17 @@ NUM_NN=0 |
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do |
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do |
|
|
|
IFS=' ' read ip port mode shardID <<< $line |
|
|
|
IFS=' ' read ip port mode shardID <<< $line |
|
|
|
if [ "$mode" == "leader" ]; then |
|
|
|
if [ "$mode" == "leader" ]; then |
|
|
|
|
|
|
|
echo "launching leader ..." |
|
|
|
$DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT $HMY_OPT2 $HMY_OPT3 -key /tmp/$ip-$port.key -is_leader 2>&1 | tee -a $LOG_FILE & |
|
|
|
$DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT $HMY_OPT2 $HMY_OPT3 -key /tmp/$ip-$port.key -is_leader 2>&1 | tee -a $LOG_FILE & |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ "$mode" == "validator" ]; then |
|
|
|
if [ "$mode" == "validator" ]; then |
|
|
|
|
|
|
|
echo "launching validator ..." |
|
|
|
$DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT $HMY_OPT2 $HMY_OPT3 -key /tmp/$ip-$port.key 2>&1 | tee -a $LOG_FILE & |
|
|
|
$DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT $HMY_OPT2 $HMY_OPT3 -key /tmp/$ip-$port.key 2>&1 | tee -a $LOG_FILE & |
|
|
|
fi |
|
|
|
fi |
|
|
|
sleep 0.5 |
|
|
|
sleep 0.5 |
|
|
|
if [[ "$mode" == "newnode" && "$SYNC" == "true" ]]; then |
|
|
|
if [[ "$mode" == "newnode" && "$SYNC" == "true" ]]; then |
|
|
|
(( NUM_NN += 35 )) |
|
|
|
(( NUM_NN += 10 )) |
|
|
|
|
|
|
|
echo "launching new node ..." |
|
|
|
(sleep $NUM_NN; $DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT $HMY_OPT2 $HMY_OPT3 -key /tmp/$ip-$port.key 2>&1 | tee -a $LOG_FILE ) & |
|
|
|
(sleep $NUM_NN; $DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT $HMY_OPT2 $HMY_OPT3 -key /tmp/$ip-$port.key 2>&1 | tee -a $LOG_FILE ) & |
|
|
|
fi |
|
|
|
fi |
|
|
|
done < $config |
|
|
|
done < $config |
|
|
|