Skip to content

Instantly share code, notes, and snippets.

@dmytrostriletskyi
Created April 26, 2019 14:04
Show Gist options
  • Save dmytrostriletskyi/a27063341187bfdca4a88d4d9aa64b42 to your computer and use it in GitHub Desktop.
Save dmytrostriletskyi/a27063341187bfdca4a88d4d9aa64b42 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Fetch the number of block on $1:"
curl --silent -X POST http://$1/rpc/ -H 'Content-Type: application/json' -d \
'{"jsonrpc":"2.0","id":"11","method":"get_block_number","params":{}}' | python3 -m json.tool
echo "Fetch the number of block on $2:"
curl --silent -X POST http://$2:8080 -H 'Content-Type: application/json' -d \
'{"jsonrpc":"2.0","id":"11","method":"get_block_number","params":{}}' | python3 -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment