go-ethereum/integration-tests/bor_health.sh
2022-11-25 14:50:18 +05:30

12 lines
No EOL
306 B
Bash

#!/bin/bash
set -e
while true
do
peers=$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'admin.peers'")
block-$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'eth.blockNumber'")
if [[ -n "$peers" ]] && [[ -n "$block" ]]; then
break
fi
done