openethereum/scripts/docker/hub/check_sync.sh
Artem Vorotnikov 4f26ffd447
Fix project name, links, rename the binaries (#11580)
* Fix project name, links, rename binary

* Update util/version/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

* Update updater/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

* Update util/version/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

Co-authored-by: David <dvdplm@gmail.com>
2020-03-25 17:16:51 +01:00

14 lines
442 B
Bash
Executable File

#!/bin/bash
# checks if OpenEthereum has a fully synced blockchain
ETH_SYNCING=$(curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545 -H 'Content-Type: application/json')
RESULT=$(echo "$ETH_SYNCING" | jq -r .result)
if [ "$RESULT" == "false" ]; then
echo "OpenEthereum is ready to start accepting traffic"
exit 0
else
echo "OpenEthereum is still syncing the blockchain"
exit 1
fi