Make block by number compatible with geth

This commit is contained in:
lash
2022-02-12 12:30:13 +00:00
parent 7f2c32975d
commit e9f31ed7f1
6 changed files with 23 additions and 11 deletions

View File

@@ -105,7 +105,10 @@ def main():
o = block_latest(id_generator=rpc.id_generator)
r = conn.do(o)
n = int(r, 16)
try:
n = int(r, 16)
except ValueError:
n = int(r)
first_block_number = n
if human:
n = format(n, ',')