From 7d6395b4d15ac13fceee0573a9160a52b8e8ca37 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Fri, 18 Jan 2019 07:20:38 +0000 Subject: [PATCH] support multiaddress of beacon chain node in deploy.sh Signed-off-by: Leo Chen --- test/deploy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/deploy.sh b/test/deploy.sh index 719fab756..1f9ea9305 100755 --- a/test/deploy.sh +++ b/test/deploy.sh @@ -119,13 +119,18 @@ LOG_FILE=$log_folder/r.log echo "launching beacon chain ..." $DRYRUN $ROOT/bin/beacon -numShards $SHARDS > $log_folder/beacon.log 2>&1 | tee -a $LOG_FILE & sleep 1 #waiting for beaconchain +MA=$(grep "Beacon Chain Started" $log_folder/beacon.log | awk -F: ' { print $2 } ') + +if [ -n "$MA" ]; then + HMY_OPT="-bc_addr $MA" +fi # Start nodes while IFS='' read -r line || [[ -n "$line" ]]; do IFS=' ' read ip port mode shardID <<< $line #echo $ip $port $mode if [ "$mode" != "client" ]; then - $DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN 2>&1 | tee -a $LOG_FILE & + $DRYRUN $ROOT/bin/harmony -ip $ip -port $port -log_folder $log_folder $DB -min_peers $MIN $HMY_OPT 2>&1 | tee -a $LOG_FILE & sleep 0.5 fi done < $config @@ -138,7 +143,7 @@ if [ "$TXGEN" == "true" ]; then line=$(grep client $config) IFS=' ' read ip port mode shardID <<< $line if [ "$mode" == "client" ]; then - $DRYRUN $ROOT/bin/txgen -log_folder $log_folder -duration $DURATION -ip $ip -port $port 2>&1 | tee -a $LOG_FILE + $DRYRUN $ROOT/bin/txgen -log_folder $log_folder -duration $DURATION -ip $ip -port $port $HMY_OPT 2>&1 | tee -a $LOG_FILE fi fi