Skip to content

Instantly share code, notes, and snippets.

@michaelsproul
Created May 16, 2021 05:41
Show Gist options
  • Save michaelsproul/631ba7478723e18ce3397a216f4329d2 to your computer and use it in GitHub Desktop.
Save michaelsproul/631ba7478723e18ce3397a216f4329d2 to your computer and use it in GitHub Desktop.
Check Geth sync status via HTTP JSON RPC
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' "http://localhost:8545"
@alextes
Copy link

alextes commented Dec 1, 2023

👍 🙏

@alextes
Copy link

alextes commented Dec 1, 2023

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