Skip to content

Instantly share code, notes, and snippets.

@stephen-tse
Created March 15, 2020 16:47
Show Gist options
  • Select an option

  • Save stephen-tse/8d7b7492596be24e895c4cd263068bc2 to your computer and use it in GitHub Desktop.

Select an option

Save stephen-tse/8d7b7492596be24e895c4cd263068bc2 to your computer and use it in GitHub Desktop.
node stats
./hmy --node=https://api.s0.os.hmny.io blockchain validator all | grep one1 | tr -d '",' > all
for x in `cat all`; do ./hmy --node=https://api.s0.os.hmny.io blockchain validator information $x | python -c 'import sys, json; print json.dumps(json.load(sys.stdin))'; done > info
< info python -c $'import sys, json\nfor x in sys.stdin:\n x = json.loads(x)["result"]["validator"]; y = x["availability"]; print "\t".join([x["name"], x["epos-eligibility-status"], str(y["num-blocks-signed"]), str(y["num-blocks-to-sign"]), x["website"], x["details"], x["address"]])' > info.tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment