123DIR=$(dirname "$0")45. $DIR/functions.sh67function is_started {8 block_id_hex=$(do_rpc chain_getHeader | jq -r .result.number)9 block_id=$((${block_id_hex}))10 echo Id = $block_id11 if (( $block_id > 1 )); then12 return 013 fi14 return 115}1617while ! is_started; do18 echo "Waiting for first block..."19 sleep 1220done21echo "Chain is running, but lets wait for another block after a minute, to avoid startup flakiness."22sleep 12023while ! is_started; do24 echo "Waiting for second block..."25 sleep 1226done27echo "Chain is running!"