github.com/bigzoro/my_simplechain@v0.0.0-20240315012955-8ad0a2a29bb9/tools/deploy/check_height.sh (about)

     1  #!/bin/bash
     2  
     3  if [ ! -e ./param_config.sh  ];then
     4  	echo "Make sure the file ./host_config.sh exists"
     5  	exit 1
     6  fi
     7  
     8  source ./param_config.sh
     9  
    10  cmd="./sipe"
    11  
    12  if [ ! -e $cmd ];then
    13  	echo "Make sure the file $cmd exists"
    14  	exit 1
    15  fi
    16  
    17  chmod +x $cmd
    18  
    19  # shellcheck disable=SC2154
    20  for((i=0;i<${#allNodeHosts[*]};i++))
    21  do
    22  	 # shellcheck disable=SC2027
    23  	 httpUrl="http://"${allNodeHosts[$i]}":$httpPort"
    24  	 echo -n "节点 ${allNodeHosts[$i]} 区块高度为:"
    25  	 ${cmd} attach "${httpUrl}"  --exec "eth.blockNumber"
    26  done