diff --git a/test/deploy_newnode.sh b/test/deploy_newnode.sh index e47c3e2d0..efd586fe6 100755 --- a/test/deploy_newnode.sh +++ b/test/deploy_newnode.sh @@ -116,6 +116,25 @@ HMY_OPT= HMY_OPT2= HMY_OPT3= +unset -v latest_bootnode_log +latest_bootnode_log=$(ls -tr "${ROOT}"/tmp_log/log-*/bootnode.log | tail -1) +case "${latest_bootnode_log}" in +"") + echo "cannot determine latest bootnode log" + exit 69 + ;; +esac +unset -v bn_ma +bn_ma=$(sed -n 's:^.*BN_MA=::p' "${latest_bootnode_log}" | tail -1) +case "${bn_ma}" in +"") + echo "cannot determine boot node address from ${latest_bootnode_log}" + exit 69 + ;; +esac +echo "autodetected boot node multiaddr: ${bn_ma}" +HMY_OPT2="-bootnodes ${bn_ma}" + for i in 0{1..9} {10..99} do echo "launching new node $i ..."