Created
May 16, 2021 05:41
-
-
Save michaelsproul/631ba7478723e18ce3397a216f4329d2 to your computer and use it in GitHub Desktop.
Check Geth sync status via HTTP JSON RPC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' "http://localhost:8545" |
Hmmm, actually, upon closer inspection, this only flags whether Geth is in the initial syncing phase. If you shut down a running node and start it up again this method will immediately return false
i.e. I'm not syncing. Although it's definitely also not caught up with the head of the chain.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍 🙏