Created
April 27, 2018 18:06
-
-
Save PixelNoob/910669a42c22a83e41cca4083e9a00cc to your computer and use it in GitHub Desktop.
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
import urllib.request | |
import json | |
url = urllib.request.urlopen('https://n2.eosargentina.io/v1/chain/get_info') | |
arg = url.read() | |
eosarg = json.loads(arg) | |
eosargentina = (eosarg["head_block_num"]) | |
eosargentina1 = str(eosargentina) | |
print ("eosargentina node is at block " + eosargentina1) | |
url = urllib.request.urlopen('http://dev.cryptolions.io:8888/v1/chain/get_info') | |
lion = url.read() | |
cryptolions = json.loads(lion) | |
lionblock = (cryptolions["head_block_num"]) | |
lionblock1 = str(lionblock) | |
print ("cryptolions node is at block " + lionblock1) | |
if eosargentina == lionblock: | |
print ("is all good") | |
else : | |
print ("we are forked!!!!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment