go-ethereum/integration-tests/bor_health.sh
2022-11-25 12:19:20 +05:30

12 lines
No EOL
305 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