Make deploy_newnode.sh autodetect bootnode

This is done by reading bootnode address from the newest bootnode log
file in tmp_log.
pull/649/head
Eugene Kim 6 years ago
parent f235758fc4
commit acee1701d5
  1. 19
      test/deploy_newnode.sh

@ -116,6 +116,25 @@ HMY_OPT=
HMY_OPT2= HMY_OPT2=
HMY_OPT3= 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} for i in 0{1..9} {10..99}
do do
echo "launching new node $i ..." echo "launching new node $i ..."

Loading…
Cancel
Save